open status. Finalization does three things atomically:
- Assigns a permanent invoice number from your configured number series (e.g.
INV/25-26/0042). Invoice numbers are consecutive and can never be reused or skipped — an auditor seeing a gap reads it as a hidden transaction. - Freezes the business and customer snapshots — the name, address, and tax ID of both parties as they appear on the PDF are locked at this moment. Future edits to your business profile or the customer record do not alter the document.
- Sets
statustoopenand assignsfinalized_at. The invoice is now visible to the customer via its public URL token.
https://invoice.horizonpay.co
Authentication
string
required
Bearer token in the form
Bearer inv_live_…. The token must carry the invoices:finalize scope.string
required
A unique key (UUID or any string up to 255 characters) you generate per logical finalize operation. This endpoint requires the header — the request is rejected with
428 if it is absent.Path Parameters
string
required
The invoice’s public ID (
in_…) or its UUID. The invoice must currently be in draft status.Request Body
This endpoint does not accept a request body.Request Example
Response Example
The server guarantees that even if two requests are sent simultaneously without an
Idempotency-Key, only one invoice number is ever assigned — the second concurrent request will find the invoice already finalized and return its existing number. The key is still required to protect against the case where the caller cannot detect this race.After finalization,
amount_due changes from 0 to the invoice total. The public_url_token is also populated on finalization, enabling the shareable customer-facing link.Response Fields
string
Unique public identifier for the invoice, prefixed
in_.string
Always
"invoice".string
The newly assigned, permanent invoice number (e.g.
"INV/25-26/0042"). Never null after a successful finalization.string
"open" immediately after finalization, unless due_date is already in the past, in which case subsequent reads return "overdue".integer
Now equals
total — the full amount is owed.string
Populated on finalization. Use this token to construct the shareable PDF link for your customer.
string
ISO 8601 datetime when the invoice was finalized.
object
The frozen set of line items. These cannot be changed after finalization.