Skip to content

Payments

Payments record money received from customers. Apply payments to one or more invoices to track what’s been paid.

GET /api/v1/books/payments

Scope: read

ParameterTypeDescription
contact_idintegerFilter by contact
statusstringFilter: pending, confirmed
fromdateReceived date from (inclusive)
todateReceived date to (inclusive)
qstringSearch payment reference or contact name
limitintegerRecords per page (default 25, max 100)
afterstringPagination cursor

GET /api/v1/books/payments/:id

Scope: read

Returns the payment with its applications:

{
"data": {
"id": 789,
"external_id": "PAY-001",
"contact_id": 42,
"contact_external_id": "cust-001",
"contact_name": "Acme Corp",
"payment_reference": "CHK-4521",
"method": "check",
"received_at": "2026-03-15T00:00:00Z",
"currency": "USD",
"amount_cents": 50000,
"gross_amount_cents": null,
"fee_cents": null,
"fee_description": null,
"unapplied_cents": 0,
"status": "confirmed",
"notes": null,
"created_at": "2026-03-15T12:00:00Z",
"updated_at": "2026-03-15T12:00:00Z",
"applications": [
{
"id": 1,
"invoice_id": 123,
"invoice_external_id": "INV-001",
"invoice_number": "INV-00001",
"amount_cents": 50000
}
]
}
}
FieldTypeDescription
idintegerUnique identifier
external_idstringYour system’s ID
contact_idintegerPaying contact
payment_referencestringCheck number, transaction ID, etc.
methodstringPayment method (e.g., check, ach, wire, credit_card)
received_attimestampWhen payment was received
currencystring3-letter currency code
amount_centsintegerNet payment amount
gross_amount_centsintegerGross amount before fees (if split payment)
fee_centsintegerProcessing fee (if split payment)
fee_descriptionstringFee description (if split payment)
unapplied_centsintegerAmount not yet applied to invoices
statusstringpending or confirmed

GET /api/v1/books/payments/by_external_id/:external_id

Scope: read


POST /api/v1/books/payments

Scope: write | Idempotency: supported

{
"payment": {
"contact_id": 42,
"payment_reference": "CHK-4521",
"method": "check",
"received_at": "2026-03-15",
"currency": "USD",
"amount_cents": 50000,
"external_id": "PAY-001",
"notes": "March payment"
}
}
FieldTypeRequiredDescription
contact_idintegeryesPaying contact
amount_centsintegeryesPayment amount
received_atdateyesDate received
currencystringnoDefaults to entity currency
payment_referencestringnoReference number
methodstringnoPayment method
external_idstringnoYour system’s ID
notesstringnoNotes

Returns: 201 Created

Webhook: books.payment.created

To record a payment with processing fees deducted:

{
"payment": {
"contact_id": 42,
"gross_amount_cents": 50000,
"fee_cents": 1500,
"fee_account_id": 15,
"fee_description": "Stripe processing fee",
"received_at": "2026-03-15",
"external_id": "PAY-002"
}
}

The net amount_cents is calculated as gross_amount_cents - fee_cents.


POST /api/v1/books/payments/:id/apply

Scope: write

{
"applications": [
{ "invoice_id": 123, "amount_cents": 30000 },
{ "invoice_id": 124, "amount_cents": 20000 }
]
}

Returns 422 with code PAYMENT_OVER_APPLIED if the total applied exceeds the payment amount or any invoice’s balance.


POST /api/v1/books/payments/:id/void

Scope: write

Voids the payment and removes all applications. Affected invoice balances are recalculated.

Webhook: books.payment.voided