Record a manual payment
curl --request POST \ --url https://example.com/api/v1/payments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "amount": 1, "invoiceId": "example", "method": "BANK_TRANSFER", "notes": "example", "paidAt": "example", "requestKey": "example" }'Records a manual payment against an invoice. Requires the payments.manage permission. Invoices outside the workspace and cancelled invoices are rejected with 422. An invoice whose payments already cover its total (nothing left to pay, PAID or not) is refused with 409: correct the existing payment with PATCH /payments/{id} or void it first with POST /payments/{id}/void (a card payment is refunded in Stripe instead, and the error says so); an invoice recorded as paid outside Chelsea has no payment to correct, and the error points to POST /invoices/{id}/mark-unpaid when that would reopen it (send clearAmountPaid: true there to also clear an amount kept from a partial record). An amount above the open balance is refused with 409 and names the balance. Send requestKey and reuse it to retry: the same key with the same payment returns the payment already recorded and records nothing, and the same key with a different payment, or whose payment was voided, answers 409. A key belongs to one invoice: the same key on another invoice records a separate payment. Put a bank reference in notes, not in the key. POST /invoices/{id}/mark-paid already records the payment for the open balance, so never follow it with this call for the same money.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
When the payment settled (ISO 8601). Defaults to now; migrated payments pass their real historical date, which also backdates the invoice’s paidAt when the balance clears.
Idempotency key of 8 to 128 letters, digits, dots, colons, dashes or underscores, generated by the caller (a UUID is fine). Repeating the same payment with the same key returns the payment the first call recorded and records nothing; the same key with a different payment, or whose payment was voided, is refused with CONFLICT. A key belongs to one invoice: the same key on another invoice records a separate payment. Put a bank reference in notes, not in the key. Send one so a retry after a timeout cannot record the money twice.
Responses
Section titled “Responses”The recorded payment.
object
A payment recorded against an invoice.
object
Payment amount as a decimal number.
Cumulative amount refunded through Stripe. Zero until a refund is recorded.
Latest Stripe dispute status on this payment, or null if never disputed.
Payment method: STRIPE, BANK_TRANSFER, CHECK, CASH or OTHER.
Payment status: PENDING, PROCESSING, SUCCEEDED, FAILED, REFUNDED or VOIDED.
Example generated
{ "data": { "amount": 1, "amountRefunded": 1, "createdAt": "2026-04-15T12:00:00Z", "disputeStatus": "example", "disputedAt": "2026-04-15T12:00:00Z", "id": "example", "invoiceId": "example", "method": "example", "notes": "example", "paidAt": "2026-04-15T12:00:00Z", "status": "example" }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Conflict.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Invalid input.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC