Skip to main content
Updates a draft invoice in place. All body fields are optional — only the keys you include are changed. Once an invoice has been finalized (status open, paid, overdue, or void), it is immutable: the customer may already have the PDF, and a silent edit would create a discrepancy. Attempting to PATCH a non-draft invoice returns a 409 invalid_state error. When you supply an items array, it replaces all existing line items on the invoice. Omit items entirely to leave the existing items untouched.
Base URL: https://invoice.horizonpay.co

Authentication

string
required
Bearer token in the form Bearer inv_live_…. The token must carry the invoices:write scope.
string
required
Must be application/json.

Path Parameters

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

Body Parameters

All fields are optional. Omitting a field leaves its current value unchanged.
string
Reassign the invoice to a different customer by their cus_… public ID or UUID.
string
Three-letter ISO 4217 currency code. Changing the currency clears any catalog-based lines whose price was denominated in the old currency.
string
"send_invoice" or "charge_automatically".
string
ISO 8601 date (YYYY-MM-DD).
string
ISO 8601 date (YYYY-MM-DD), or "" to clear the due date.
integer
Number of days from issue_date until payment is due (0–365). Ignored if due_date is also supplied.
string
Notes shown on the invoice body. Pass null to clear.
Footer text shown at the bottom of the invoice, typically used for payment terms. Pass null to clear.
array
Replaces all existing line items. Omit this field to keep the current items unchanged. The array must contain at least one item if supplied.

Request Example


Response Example

PATCH is only allowed on draft invoices. Attempting to update an invoice with status open, paid, overdue, or void returns 409 invalid_state. Use POST /api/v1/invoices/:id/void to cancel an open invoice with an audit trail. There is no endpoint to modify a finalized invoice — issue a new one instead.
Supplying items in the body fully replaces all line items — there is no way to add, remove, or update individual lines via PATCH. To keep existing lines, read them first with GET /api/v1/invoices/:id, modify the array in your client, and send the complete updated array.

Response Fields

string
Unique public identifier for the invoice, prefixed in_.
string
Always "invoice".
null
Still null — the invoice remains a draft until finalized.
string
Always "draft" after a successful PATCH, confirming the invoice was editable.
string
ISO 8601 datetime of this update.
object
The complete, updated set of line items after the PATCH is applied.
For all other fields, see the Retrieve Invoice response fields.

Error Codes