REST
Invoices
Issue, retrieve and void invoices.
Invoices are immutable once issued; a correction is a credit note, never an edit. This page is a placeholder for the invoice endpoints.
Retrieve an invoice#
GET
/v1/invoices/{id}Returns one invoice with its line items and payments.
| Field | Type | Notes |
|---|---|---|
id | string | Invoice id |
status | string | draft, open, paid, void |
amountDue | string | Decimal string, never a float |
lineItems | object[] | Ordered line items |
Issue an invoice#
POST
/v1/invoices/{id}/issueFinalises a draft invoice and assigns its number.
curl -X POST -H "Authorization: Bearer $VERLIX_API_KEY" \
https://api.verlix.example/v1/invoices/inv_01H.../issueNumbers are assigned on issue
A draft has no invoice number. The number is assigned atomically when the invoice is issued, so two drafts never collide.
Void an invoice#
POST
/v1/invoices/{id}/voidVoids an open invoice. A paid invoice must be credited instead.
| Field | Type | Notes |
|---|---|---|
reason | string | Required; stored on the audit trail |
Money is a string#
Amounts are decimal strings such as "1250.00". Parse them with a decimal library, never with parseFloat, or a rounding error will eventually move a cent.