v1

latestOpenAPI 3.0.32026-08-0623677345.2 KB
Billing

Finalize invoice

Submits the invoice to the tax agency (when applicable) and locks the document. Requires status draft or pending. When status is pending all linked payments must be succeeded.

get/invoices/{id}/finalize/

Response

Finalized invoice.

idstring
customerstring required

Customer ID.

documentinteger required

Document type ID (fiscal document; depends on country).

numberinteger

Sequence number assigned at finalize time.

currencystring

Currency code from the customer's currency.

datestring date required
due_datestring date nullable
period_startstring date nullable
period_endstring date nullable
collection_method'deferred' | 'deferred_dues' | 'automatically' required
notestring nullable
amountnumber nullable

Subtotal of taxable lines (computed).

exemptnumber nullable

Subtotal of tax-exempt lines (computed).

taxnumber nullable

Total tax (computed).

tax_percentnumber nullable
subtotalnumber nullable
totalnumber nullable

Final amount (computed).

total_adjustednumber nullable
retentionnumber nullable
discountnumber nullable
discount_scheme'%' | '$' nullable
custom_changenumber nullable

Custom currency conversion factor.

status'draft' | 'finalized' | 'paid' | 'cancelled' | 'uncollectible' | 'pending'
biller_status'pending' | 'queued' | 'succeeded' | 'failed' | 'processing'
tax_agencyobject

Tax-agency response payload (country-specific).

local_filestring uri nullable

Signed URL to the fiscal PDF/XML when applicable.

subscriptioninteger nullable

Linked subscription ID when generated by a subscription cycle.

importedboolean
uncollectiblestring date-time nullable
test_modeboolean
paymentsobject[]
createdstring date-time
updatedstring date-time

Example response

{
  "id": "inv_01H8XYZ123ABC"
}