Skip to main content

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


List / search payments

Query params: 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

Returns the new payment (201, status paid).

Update a payment

Updates the editable fields (a payment cannot be moved between invoices). When payment_gateway is omitted the existing method is preserved.

Delete a payment

Deletes the payment (and cascades its linked refund, if any) and refreshes the parent invoice.

Set tags

Full-set replace (empty clears).

Refund a payment

Creates the refund for the payment. A refund returns the full payment amount (no partials), marks the payment refunded, and is limited to one per payment (409 if already refunded).
Returns the payment with the nested refund (201).

Remove a refund

Deletes the linked refund and marks the payment paid again. Returns the payment (200).

Errors

See Getting started. Payment-specific: