Payments Made
Payments made to vendors, with bill allocations. Read-only via the API.
GET
/api/v1/payments-madeList payments made
Scope:
paymentsMade.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | Optional | 1-based page number. |
limit | query | number | Optional | Page size, max 200. |
q | query | string | Optional | Free-text search on payment number, reference number, or vendor name. |
Example request
curl "https://pre-invoice.avscorp.in/api/v1/payments-made" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2pmt001000000000000001",
"paymentNumber": "PMT-2026-0058",
"vendorId": "clx2vnd001000000000000001",
"vendorName": "Shree Textile Suppliers",
"paymentDate": "2026-07-15T00:00:00.000Z",
"mode": "BANK_TRANSFER",
"referenceNumber": "UTR1234567890",
"paidThroughAccount": "HDFC Current A/C",
"amount": 30000,
"allocated": 30000,
"openingBalanceApplied": 0,
"currencyCode": "INR",
"exchangeRate": 1,
"notes": null,
"createdAt": "2026-07-15T08:00:00.000Z",
"updatedAt": "2026-07-15T08:00:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
GET
/api/v1/payments-made/{id}Get a payment made
Scope:
paymentsMade.readAdds bill allocations and createdBy on top of the list row shape.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Payment ID. |
Example request
curl "https://pre-invoice.avscorp.in/api/v1/payments-made/clx2pmt001000000000000001" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2pmt001000000000000001",
"paymentNumber": "PMT-2026-0058",
"vendorId": "clx2vnd001000000000000001",
"vendorName": "Shree Textile Suppliers",
"paymentDate": "2026-07-15T00:00:00.000Z",
"mode": "BANK_TRANSFER",
"referenceNumber": "UTR1234567890",
"paidThroughAccount": "HDFC Current A/C",
"amount": 30000,
"allocated": 30000,
"openingBalanceApplied": 0,
"currencyCode": "INR",
"exchangeRate": 1,
"notes": null,
"createdAt": "2026-07-15T08:00:00.000Z",
"updatedAt": "2026-07-15T08:00:00.000Z",
"createdBy": "clx2usr001000000000000001",
"allocations": [
{
"id": "clx2pma001000000000000001",
"paymentId": "clx2pmt001000000000000001",
"billId": "clx2bil001000000000000001",
"billNumber": "BILL-2026-0091",
"amount": 30000
}
]
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found
POST
/api/v1/payments-madeRecord a payment made
Scope:
paymentsMade.createSupports Idempotency-KeyRecords a payment to a vendor, optionally allocated across bills. Accepts an optional Idempotency-Key header. Returns only { id }.
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
vendorId | string | Required | min length 1 |
paymentDate | string | Required | — |
mode | string | Optional | one of: CASH, BANK_TRANSFER, UPI, CARD, CHEQUE, RAZORPAY, OTHER; default "BANK_TRANSFER" |
referenceNumber | any | Optional | — |
paidThroughAccount | any | Optional | — |
amount | number | Required | — |
currencyCode | string | Optional | min length 3; max length 3; default "INR" |
exchangeRate | number | Optional | default 1 |
notes | any | Optional | — |
allocations | array | Optional | default [] |
openingBalanceApplied | number | Optional | min 0; default 0 |
Example request
curl -X POST "https://pre-invoice.avscorp.in/api/v1/payments-made" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"vendorId": "clx4ven000000000000000001",
"paymentDate": "2026-10-29",
"amount": 945,
"mode": "BANK_TRANSFER"
}'Example response
JSON
{
"id": "clxbpm000000000000000001"
}Possible errors: unauthorized, insufficient_scope, forbidden, validation_error, conflict