Payments
The Payments API provides CRUD access to payments, tags, and the refund sub-resource.New to the API? Start with Getting started (base URL, response envelope, errors, pagination) and Authentication (API keys).
Identifier note: payments are addressed by their numeric payment_id.
A payment always belongs to an invoice. You supply payment_invoiceid; the client and
project are derived from that invoice (never sent). Recording, updating or deleting a payment
refreshes the parent invoice (paid amount / status).
Scope: online gateway payment flows (Stripe/PayPal/etc.), public thank-you/webhook handlers, per-user pinning and bulk actions are out of API scope. The linked refund is created/removed here; the Refunds resource provides read access.
The payment object
| Field | Type | Notes |
|---|---|---|
id | integer | Payment id. |
status | string | paid or refunded. |
amount | numeric | Payment amount. |
date | date | Payment date. |
gateway | string | Payment method. Defaults to bank for a manually recorded payment; any other value is a gateway the caller supplies. |
transaction_id / notes | string | Optional. |
invoice | object | The parent invoice (id, formatted_id). |
client / project_id / creator_id | object/int | Derived links. |
refund | object | The linked refund (has_refund + details), or empty. |
tags | array | Tag titles. |
List / search payments
invoice_id, client_id, project_id, gateway, amount_min, amount_max,
date_start, date_end, search, tags[], sort (payment_date,payment_amount,payment_created),
order, limit, page.
Get a payment
Record a payment
| Parameter | Type | Required | Notes |
|---|---|---|---|
payment_invoiceid | integer | yes | Existing invoice. |
payment_amount | numeric | yes | Must be greater than 0. |
payment_date | date | yes | |
payment_gateway | string | no | Payment method. Defaults to bank when omitted. |
payment_transaction_id | string | no | |
payment_notes | string | no | |
send_payment_email | string | no | yes to queue the “payment received” email to the client (as the UI does). Default no. |
201, status paid).
Update a payment
payment_gateway is omitted the existing method is preserved.
| Parameter | Type | Required |
|---|---|---|
payment_amount | numeric | yes |
payment_date | date | yes |
payment_gateway | string | no |
payment_transaction_id | string | no |
payment_notes | string | no |
Delete a payment
Set tags
Refund a payment
refunded, and is limited to one per payment (409 if already refunded).
| Parameter | Type | Required |
|---|---|---|
refund_date | date | yes |
refund_notes | string | no |
refund (201).
Remove a refund
paid again. Returns the payment (200).
Errors
See Getting started. Payment-specific:| Status | Meaning |
|---|---|
404 Not Found | The payment id does not exist. |
409 Conflict | The payment already has a refund. |
422 Unprocessable Entity | Validation failed (e.g. missing/invalid invoice, amount not greater than 0, missing date). |