Skip to main content
Marks an open or overdue invoice as paid. This is an out-of-band payment recording endpoint: it does not initiate a charge or move funds. Use it to reflect a payment that was received externally — via bank transfer, cheque, cash, or a payment processor outside of Invoice AI. On success the invoice’s status moves to "paid", paid_at is set to the current server time (or to the paid_on date you supply), and amount_due drops to 0. The invoice.paid webhook event fires after the response is committed.
Base URL: https://invoice.horizonpay.co

Authentication

string
required
Bearer token in the form Bearer inv_live_…. The token must carry the payments:write scope.
string
required
A unique key (UUID or any string up to 255 characters) you generate per logical pay operation. This endpoint requires the header — the request is rejected with 428 if it is absent.
string
application/json. Required when sending a body; may be omitted if the body is empty.

Path Parameters

string
required
The invoice’s public ID (in_…) or its UUID. The invoice must be in open or overdue status.

Body Parameters

The request body is optional. If omitted, the invoice is marked paid at the current server time with no reference.
string
ISO 8601 date the payment was received (YYYY-MM-DD). Defaults to today if omitted. Stored in paid_at.
string
Free-text payment reference (e.g. a bank transaction ID, cheque number, or payment processor charge ID). Stored for your records only — not exposed on the invoice PDF.

Request Example


Response Example

Idempotency-Key is required on this endpoint. Recording a payment is not idempotent by default: a duplicate call without a key on an already-paid invoice returns 409 invalid_state, but a race between two retries can trigger two invoice.paid webhook deliveries and any downstream logic that depends on them (e.g. releasing a digital product, updating accounting software). Always generate a fresh UUID per pay operation and retain it for retries.
The response does not include the lines field. If you need line item detail alongside the payment confirmation, follow this call with GET /api/v1/invoices/:id.
A paid invoice cannot be voided. In accounting, reversing a paid invoice requires a credit note — a separate document with its own numbering. Credit notes are out of scope for v1 of this API.

Response Fields

string
Unique public identifier for the invoice, prefixed in_.
string
Always "invoice".
string
The invoice number, unchanged from when it was finalized.
string
"paid" after a successful pay operation.
integer
Always 0 after the invoice is paid.
string
ISO 8601 datetime the payment was recorded. Reflects the paid_on date if you supplied one, otherwise the server timestamp at the time of the API call.
integer
The full invoice total in minor units. Unchanged by the pay operation.
For all other fields, see the Retrieve Invoice response fields.

Error Codes