Skip to content

Vendor Payments

Vendor payments track money paid to vendors. After creating a payment, apply it to one or more bills to reduce their balance.

GET /api/books/vendor_payments

Scope: read

ParameterTypeDescription
contact_idintegerFilter by vendor contact
{
"vendor_payments": [
{
"id": 1,
"contact_id": 42,
"contact_name": "Acme Materials",
"payment_reference": "CHK-1234",
"method": "check",
"paid_at": "2026-03-15",
"currency": "USD",
"amount_cents": 109500,
"unapplied_cents": 0,
"status": "confirmed",
"notes": null,
"attachment_count": 0,
"created_at": "2026-03-15T12:00:00Z",
"updated_at": "2026-03-15T12:00:00Z"
}
]
}

GET /api/books/vendor_payments/:id

Scope: read

Returns the payment with its bill applications:

{
"vendor_payment": {
"id": 1,
"contact_id": 42,
"contact_name": "Acme Materials",
"payment_reference": "CHK-1234",
"method": "check",
"paid_at": "2026-03-15",
"currency": "USD",
"amount_cents": 109500,
"unapplied_cents": 0,
"status": "confirmed",
"notes": null,
"attachment_count": 0,
"applications": [
{
"id": 5,
"bill_id": 1,
"bill_number": "BILL-00001",
"amount_cents": 109500
}
],
"created_at": "2026-03-15T12:00:00Z",
"updated_at": "2026-03-15T12:00:00Z"
}
}
FieldTypeDescription
idintegerUnique identifier
contact_idintegerVendor contact ID
contact_namestringVendor name
payment_referencestringCheck number, wire ref, etc.
methodstringPayment method (e.g. check, ach, wire)
paid_atdateDate payment was made
currencystring3-letter currency code
amount_centsintegerTotal payment amount
unapplied_centsintegerAmount not yet applied to bills
statusstringpending, confirmed, or void
notesstringFree-text notes

POST /api/books/vendor_payments

Scope: write

{
"vendor_payment": {
"contact_id": 42,
"payment_reference": "CHK-1234",
"method": "check",
"paid_at": "2026-03-15",
"currency": "USD",
"amount_cents": 109500,
"status": "confirmed",
"notes": "March rental payment"
}
}
FieldTypeRequiredDescription
contact_idintegeryesVendor contact ID
amount_centsintegeryesPayment amount
paid_atdateyesPayment date
payment_referencestringnoCheck number, wire reference, etc.
methodstringnoPayment method
currencystringnoDefaults to entity currency
statusstringnopending or confirmed (default pending)
notesstringnoNotes

Returns: 201 Created


POST /api/books/vendor_payments/:id/apply

Scope: write

Applies a payment to one or more bills. Each application reduces the bill’s balance and the payment’s unapplied amount.

{
"applications": [
{ "bill_id": 1, "amount_cents": 109500 }
]
}
FieldTypeRequiredDescription
applications[].bill_idintegeryesBill to apply payment to
applications[].amount_centsintegeryesAmount to apply

Returns 422 if:

  • Application amount exceeds unapplied balance
  • Application amount exceeds bill balance due

POST /api/books/vendor_payments/:id/void

Scope: write

Voids a payment and reverses all bill applications. Bills’ balances are restored.

Returns 409 Conflict if the payment is already voided.