TagPayTagPay

API Reference

Invoices

An Invoice is a billable document sent to a customer with one or more amounts due. Invoices can be paid in full or via an installment schedule (fixed kobo amounts or percentages). The customer pays through the hosted invoice page — TagPay handles email delivery, reminders, overdue flags, and the PDF rendering for you.

Create an invoice

POST/v1/invoices

One of customer_id or customer_email is required. By default the invoice is created in pending (sent) status and the customer receives an email immediately — pass auto_send: false to create a draft and send it later via POST /v1/invoices/:code/send. Optional installments array creates a payment schedule: at least 2 entries, all of the same amount_kind, summing to the invoice total (fixed kobo) or exactly 100 (percentage). Minimum invoice amount is 10,000 kobo. Fires invoice.created.

Body parameters

amountintegerrequired

Total payable in kobo. Minimum 10,000.

subtotalintegeroptional

Pre-tax/pre-discount sum (kobo). When provided, amount must equal subtotal - discount + tax — we recompute and validate.

vat_ratenumberoptional

VAT rate as a percent. Nigerian standard is 7.5. Applied to subtotal - discount.

discount_amountintegeroptional

Discount in kobo, applied before tax.

customer_emailstringoptional

Customer email. Required when customer_id is omitted.

customer_idstringoptional

Existing Customer ID. Takes precedence over customer_email. Must be owned by you.

descriptionstringoptional

Short summary shown on the invoice (up to 500 chars).

notesstringoptional

Free-text terms shown on the PDF / hosted page (up to 2,000 chars).

due_datestringoptional

ISO-8601 due date for the overall balance.

line_itemsarray<object>optional

Itemised breakdown.

descriptionstringrequired

Line description (1–200 chars).

amountintegerrequired

Per-line amount in kobo.

quantityintegeroptional

Quantity (default 1).

installmentsarray<object>optional

Optional payment schedule. Requires ≥2 entries, all of the same amount_kind. Fixed entries must sum to amount; percentage entries must sum to exactly 100. Past due_date values are accepted — the overdue cron will flip them immediately.

amount_kindenum<'fixed' | 'percentage'>required

How the installment is expressed.

amount_inputnumberrequired

For fixed: kobo. For percentage: percent (1–100). Server resolves percentages to kobo at creation; the last entry absorbs rounding so the resolved amounts sum to amount exactly.

due_datestringrequired

ISO-8601 due date for this installment.

auto_sendbooleanoptional

Whether to immediately move the invoice from draft to pending (sent). Defaults to true.

metadataobjectoptional

Arbitrary key/value pairs.

Response

201
invoice_codestring

TagPay invoice code (`INV_…`). Use this in every invoice API call.

invoice_numberstring | null

Sequential human-readable invoice number (e.g. `INV-2026-0042`). Allocated when the invoice leaves `draft`; null for drafts.

amountinteger

Total payable in kobo.

subtotalinteger

Pre-tax/pre-discount amount in kobo.

tax_amountinteger

VAT applied in kobo.

discount_amountinteger

Discount applied before tax, in kobo.

vat_ratenumber | null

VAT percent (e.g. `7.5`), or null when no tax applies.

currencystring

Always `NGN`.

statusenum<'draft' | 'pending' | 'paid' | 'overdue' | 'cancelled' | 'uncollectible'>

Lifecycle state.

descriptionstring | null

Short summary shown on the invoice.

notesstring | null

Free-text terms shown on the PDF and hosted page.

due_datestring | null

ISO-8601 due date for the whole invoice (single-payment invoices) or for the overall balance.

paid_atstring | null

ISO-8601 timestamp the invoice was fully settled.

sent_atstring | null

ISO-8601 timestamp the invoice transitioned out of draft.

voided_atstring | null

ISO-8601 timestamp the invoice was cancelled.

marked_paid_atstring | null

ISO-8601 timestamp the invoice was marked paid off-platform.

customer_emailstring | null

Customer email used for delivery.

customer_idstring | null

Linked Customer ID, or null for guest invoices.

transaction_idstring | null

Transaction that settled the invoice.

pdf_urlstring | null

Cached PDF URL. Null today — re-render via `GET /v1/invoices/:code/pdf`.

line_itemsarray<object> | null

Optional line-item breakdown — `{ description, amount, quantity? }`.

installmentsarray<Installment>

Payment schedule. Empty array for single-payment invoices.

idstring

Installment ID.

ordinalinteger

1-indexed position in the schedule.

amountinteger

Resolved amount in kobo.

amount_kindenum<'fixed' | 'percentage'>

How the merchant originally entered the amount.

amount_inputstring

Original input as a decimal string — kobo amount for `fixed`, percent for `percentage` (e.g. `"33.33"`).

due_datestring

ISO-8601 due date.

statusenum<'pending' | 'paid' | 'overdue'>

Installment state.

paid_atstring | null

ISO-8601 timestamp the installment was settled.

transaction_idstring | null

Transaction that settled this installment, if paid.

metadataobject | null

Arbitrary merchant-supplied key/value pairs.

created_atstring

ISO-8601 creation timestamp.

updated_atstring

ISO-8601 last-update timestamp.

Errors

VALIDATION_ERROR400Neither `customer_id` nor `customer_email` was supplied, totals are inconsistent, or installments violate the sum / `amount_kind` rules.
NOT_FOUND404`customer_id` does not exist or is not owned by you.
INVALID_KEY401Secret key missing or invalid.

List invoices

GET/v1/invoices

Returns invoices in reverse-chronological order. Results are scoped to the mode (test/live) of the secret key used.

Query parameters

statusenum<'draft' | 'pending' | 'paid' | 'overdue' | 'cancelled' | 'uncollectible'>optional

Filter by lifecycle state.

customer_emailstringoptional

Filter by partial, case-insensitive email match.

pageintegeroptional

Page number, 1-indexed. Defaults to 1.

per_pageintegeroptional

Results per page. Defaults to 20.

Response

200
dataarray<Invoice>

Array of invoice objects (same shape as create).

metaobject

Pagination metadata.

totalinteger

Total matching records.

pageinteger

Current page.

per_pageinteger

Per-page count.

page_countinteger

Total number of pages.

Errors

INVALID_KEY401Secret key missing or invalid.

Retrieve an invoice

GET/v1/invoices/:code

Returns the full invoice resource, including the installment schedule (empty when there is no schedule).

Path parameters

codestringrequired

The invoice code (INV_…).

Response

200
invoice_codestring

TagPay invoice code (`INV_…`). Use this in every invoice API call.

invoice_numberstring | null

Sequential human-readable invoice number (e.g. `INV-2026-0042`). Allocated when the invoice leaves `draft`; null for drafts.

amountinteger

Total payable in kobo.

subtotalinteger

Pre-tax/pre-discount amount in kobo.

tax_amountinteger

VAT applied in kobo.

discount_amountinteger

Discount applied before tax, in kobo.

vat_ratenumber | null

VAT percent (e.g. `7.5`), or null when no tax applies.

currencystring

Always `NGN`.

statusenum<'draft' | 'pending' | 'paid' | 'overdue' | 'cancelled' | 'uncollectible'>

Lifecycle state.

descriptionstring | null

Short summary shown on the invoice.

notesstring | null

Free-text terms shown on the PDF and hosted page.

due_datestring | null

ISO-8601 due date for the whole invoice (single-payment invoices) or for the overall balance.

paid_atstring | null

ISO-8601 timestamp the invoice was fully settled.

sent_atstring | null

ISO-8601 timestamp the invoice transitioned out of draft.

voided_atstring | null

ISO-8601 timestamp the invoice was cancelled.

marked_paid_atstring | null

ISO-8601 timestamp the invoice was marked paid off-platform.

customer_emailstring | null

Customer email used for delivery.

customer_idstring | null

Linked Customer ID, or null for guest invoices.

transaction_idstring | null

Transaction that settled the invoice.

pdf_urlstring | null

Cached PDF URL. Null today — re-render via `GET /v1/invoices/:code/pdf`.

line_itemsarray<object> | null

Optional line-item breakdown — `{ description, amount, quantity? }`.

installmentsarray<Installment>

Payment schedule. Empty array for single-payment invoices.

idstring

Installment ID.

ordinalinteger

1-indexed position in the schedule.

amountinteger

Resolved amount in kobo.

amount_kindenum<'fixed' | 'percentage'>

How the merchant originally entered the amount.

amount_inputstring

Original input as a decimal string — kobo amount for `fixed`, percent for `percentage` (e.g. `"33.33"`).

due_datestring

ISO-8601 due date.

statusenum<'pending' | 'paid' | 'overdue'>

Installment state.

paid_atstring | null

ISO-8601 timestamp the installment was settled.

transaction_idstring | null

Transaction that settled this installment, if paid.

metadataobject | null

Arbitrary merchant-supplied key/value pairs.

created_atstring

ISO-8601 creation timestamp.

updated_atstring

ISO-8601 last-update timestamp.

Errors

NOT_FOUND404No invoice with that code in this mode.

Update a draft invoice

PUT/v1/invoices/:code

Drafts only. Pending / overdue / paid / cancelled / uncollectible invoices reject with 409 — once sent, the audit trail is load-bearing. Void and reissue to change billing terms after send. Partial update. Pass installments: [] to clear the schedule and turn the invoice into a single-payment one.

Path parameters

codestringrequired

The invoice code (INV_…).

Body parameters

amountintegeroptional

New total in kobo. Minimum 10,000.

subtotalintegeroptional

New pre-tax/pre-discount sum in kobo.

vat_ratenumberoptional

New VAT rate. Pass null to clear.

discount_amountintegeroptional

New discount in kobo.

customer_emailstringoptional

New customer email (guest invoices).

customer_idstringoptional

New linked Customer ID.

descriptionstringoptional

New description. Pass null to clear.

notesstringoptional

New notes. Pass null to clear.

due_datestringoptional

New ISO-8601 due date. Pass null to clear.

line_itemsarray<object>optional

Replaces the line items wholesale.

installmentsarray<object>optional

Replaces the entire schedule. Same validation as on create. Pass [] to remove the schedule.

metadataobjectoptional

Replaces the stored metadata.

Response

200
invoice_codestring

TagPay invoice code (`INV_…`). Use this in every invoice API call.

invoice_numberstring | null

Sequential human-readable invoice number (e.g. `INV-2026-0042`). Allocated when the invoice leaves `draft`; null for drafts.

amountinteger

Total payable in kobo.

subtotalinteger

Pre-tax/pre-discount amount in kobo.

tax_amountinteger

VAT applied in kobo.

discount_amountinteger

Discount applied before tax, in kobo.

vat_ratenumber | null

VAT percent (e.g. `7.5`), or null when no tax applies.

currencystring

Always `NGN`.

statusenum<'draft' | 'pending' | 'paid' | 'overdue' | 'cancelled' | 'uncollectible'>

Lifecycle state.

descriptionstring | null

Short summary shown on the invoice.

notesstring | null

Free-text terms shown on the PDF and hosted page.

due_datestring | null

ISO-8601 due date for the whole invoice (single-payment invoices) or for the overall balance.

paid_atstring | null

ISO-8601 timestamp the invoice was fully settled.

sent_atstring | null

ISO-8601 timestamp the invoice transitioned out of draft.

voided_atstring | null

ISO-8601 timestamp the invoice was cancelled.

marked_paid_atstring | null

ISO-8601 timestamp the invoice was marked paid off-platform.

customer_emailstring | null

Customer email used for delivery.

customer_idstring | null

Linked Customer ID, or null for guest invoices.

transaction_idstring | null

Transaction that settled the invoice.

pdf_urlstring | null

Cached PDF URL. Null today — re-render via `GET /v1/invoices/:code/pdf`.

line_itemsarray<object> | null

Optional line-item breakdown — `{ description, amount, quantity? }`.

installmentsarray<Installment>

Payment schedule. Empty array for single-payment invoices.

idstring

Installment ID.

ordinalinteger

1-indexed position in the schedule.

amountinteger

Resolved amount in kobo.

amount_kindenum<'fixed' | 'percentage'>

How the merchant originally entered the amount.

amount_inputstring

Original input as a decimal string — kobo amount for `fixed`, percent for `percentage` (e.g. `"33.33"`).

due_datestring

ISO-8601 due date.

statusenum<'pending' | 'paid' | 'overdue'>

Installment state.

paid_atstring | null

ISO-8601 timestamp the installment was settled.

transaction_idstring | null

Transaction that settled this installment, if paid.

metadataobject | null

Arbitrary merchant-supplied key/value pairs.

created_atstring

ISO-8601 creation timestamp.

updated_atstring

ISO-8601 last-update timestamp.

Errors

NOT_FOUND404No invoice with that code in this mode, or `customer_id` does not exist.
UNPROCESSABLE409Invoice is not a draft — void and reissue instead.
VALIDATION_ERROR400Totals are inconsistent or installments violate the sum / `amount_kind` rules.

Send (or re-send) an invoice

POST/v1/invoices/:code/send

Drafts transition to pending: the sequential invoice_number is allocated atomically, sent_at is stamped, the customer email goes out, and invoice.created fires. For pending / overdue invoices this re-sends the existing email (no DB change) — useful as a manual nudge. Paid / cancelled / uncollectible invoices reject with 409.

Path parameters

codestringrequired

The invoice code (INV_…).

Response

200
invoice_codestring

TagPay invoice code (`INV_…`). Use this in every invoice API call.

invoice_numberstring | null

Sequential human-readable invoice number (e.g. `INV-2026-0042`). Allocated when the invoice leaves `draft`; null for drafts.

amountinteger

Total payable in kobo.

subtotalinteger

Pre-tax/pre-discount amount in kobo.

tax_amountinteger

VAT applied in kobo.

discount_amountinteger

Discount applied before tax, in kobo.

vat_ratenumber | null

VAT percent (e.g. `7.5`), or null when no tax applies.

currencystring

Always `NGN`.

statusenum<'draft' | 'pending' | 'paid' | 'overdue' | 'cancelled' | 'uncollectible'>

Lifecycle state.

descriptionstring | null

Short summary shown on the invoice.

notesstring | null

Free-text terms shown on the PDF and hosted page.

due_datestring | null

ISO-8601 due date for the whole invoice (single-payment invoices) or for the overall balance.

paid_atstring | null

ISO-8601 timestamp the invoice was fully settled.

sent_atstring | null

ISO-8601 timestamp the invoice transitioned out of draft.

voided_atstring | null

ISO-8601 timestamp the invoice was cancelled.

marked_paid_atstring | null

ISO-8601 timestamp the invoice was marked paid off-platform.

customer_emailstring | null

Customer email used for delivery.

customer_idstring | null

Linked Customer ID, or null for guest invoices.

transaction_idstring | null

Transaction that settled the invoice.

pdf_urlstring | null

Cached PDF URL. Null today — re-render via `GET /v1/invoices/:code/pdf`.

line_itemsarray<object> | null

Optional line-item breakdown — `{ description, amount, quantity? }`.

installmentsarray<Installment>

Payment schedule. Empty array for single-payment invoices.

idstring

Installment ID.

ordinalinteger

1-indexed position in the schedule.

amountinteger

Resolved amount in kobo.

amount_kindenum<'fixed' | 'percentage'>

How the merchant originally entered the amount.

amount_inputstring

Original input as a decimal string — kobo amount for `fixed`, percent for `percentage` (e.g. `"33.33"`).

due_datestring

ISO-8601 due date.

statusenum<'pending' | 'paid' | 'overdue'>

Installment state.

paid_atstring | null

ISO-8601 timestamp the installment was settled.

transaction_idstring | null

Transaction that settled this installment, if paid.

metadataobject | null

Arbitrary merchant-supplied key/value pairs.

created_atstring

ISO-8601 creation timestamp.

updated_atstring

ISO-8601 last-update timestamp.

Errors

NOT_FOUND404No invoice with that code in this mode.
UNPROCESSABLE409Invoice is paid, cancelled, or uncollectible — nothing to send.

Void an invoice

POST/v1/invoices/:code/void

Cancels a draft, pending, or overdue invoice. Stamps voided_at, flips status to cancelled, emails the customer (only when previously sent), and fires invoice.cancelled. Paid or already-cancelled invoices reject with 409.

Path parameters

codestringrequired

The invoice code (INV_…).

Response

200
invoice_codestring

TagPay invoice code (`INV_…`). Use this in every invoice API call.

invoice_numberstring | null

Sequential human-readable invoice number (e.g. `INV-2026-0042`). Allocated when the invoice leaves `draft`; null for drafts.

amountinteger

Total payable in kobo.

subtotalinteger

Pre-tax/pre-discount amount in kobo.

tax_amountinteger

VAT applied in kobo.

discount_amountinteger

Discount applied before tax, in kobo.

vat_ratenumber | null

VAT percent (e.g. `7.5`), or null when no tax applies.

currencystring

Always `NGN`.

statusenum<'draft' | 'pending' | 'paid' | 'overdue' | 'cancelled' | 'uncollectible'>

Lifecycle state.

descriptionstring | null

Short summary shown on the invoice.

notesstring | null

Free-text terms shown on the PDF and hosted page.

due_datestring | null

ISO-8601 due date for the whole invoice (single-payment invoices) or for the overall balance.

paid_atstring | null

ISO-8601 timestamp the invoice was fully settled.

sent_atstring | null

ISO-8601 timestamp the invoice transitioned out of draft.

voided_atstring | null

ISO-8601 timestamp the invoice was cancelled.

marked_paid_atstring | null

ISO-8601 timestamp the invoice was marked paid off-platform.

customer_emailstring | null

Customer email used for delivery.

customer_idstring | null

Linked Customer ID, or null for guest invoices.

transaction_idstring | null

Transaction that settled the invoice.

pdf_urlstring | null

Cached PDF URL. Null today — re-render via `GET /v1/invoices/:code/pdf`.

line_itemsarray<object> | null

Optional line-item breakdown — `{ description, amount, quantity? }`.

installmentsarray<Installment>

Payment schedule. Empty array for single-payment invoices.

idstring

Installment ID.

ordinalinteger

1-indexed position in the schedule.

amountinteger

Resolved amount in kobo.

amount_kindenum<'fixed' | 'percentage'>

How the merchant originally entered the amount.

amount_inputstring

Original input as a decimal string — kobo amount for `fixed`, percent for `percentage` (e.g. `"33.33"`).

due_datestring

ISO-8601 due date.

statusenum<'pending' | 'paid' | 'overdue'>

Installment state.

paid_atstring | null

ISO-8601 timestamp the installment was settled.

transaction_idstring | null

Transaction that settled this installment, if paid.

metadataobject | null

Arbitrary merchant-supplied key/value pairs.

created_atstring

ISO-8601 creation timestamp.

updated_atstring

ISO-8601 last-update timestamp.

Errors

NOT_FOUND404No invoice with that code in this mode.
UNPROCESSABLE409Invoice is already paid or cancelled.

Cancel an invoice (alias)

POST/v1/invoices/:code/cancel

Behaves identically to POST /v1/invoices/:code/void. Prefer the /void route for new code.

Path parameters

codestringrequired

The invoice code (INV_…).

Response

200
invoice_codestring

TagPay invoice code (`INV_…`). Use this in every invoice API call.

invoice_numberstring | null

Sequential human-readable invoice number (e.g. `INV-2026-0042`). Allocated when the invoice leaves `draft`; null for drafts.

amountinteger

Total payable in kobo.

subtotalinteger

Pre-tax/pre-discount amount in kobo.

tax_amountinteger

VAT applied in kobo.

discount_amountinteger

Discount applied before tax, in kobo.

vat_ratenumber | null

VAT percent (e.g. `7.5`), or null when no tax applies.

currencystring

Always `NGN`.

statusenum<'draft' | 'pending' | 'paid' | 'overdue' | 'cancelled' | 'uncollectible'>

Lifecycle state.

descriptionstring | null

Short summary shown on the invoice.

notesstring | null

Free-text terms shown on the PDF and hosted page.

due_datestring | null

ISO-8601 due date for the whole invoice (single-payment invoices) or for the overall balance.

paid_atstring | null

ISO-8601 timestamp the invoice was fully settled.

sent_atstring | null

ISO-8601 timestamp the invoice transitioned out of draft.

voided_atstring | null

ISO-8601 timestamp the invoice was cancelled.

marked_paid_atstring | null

ISO-8601 timestamp the invoice was marked paid off-platform.

customer_emailstring | null

Customer email used for delivery.

customer_idstring | null

Linked Customer ID, or null for guest invoices.

transaction_idstring | null

Transaction that settled the invoice.

pdf_urlstring | null

Cached PDF URL. Null today — re-render via `GET /v1/invoices/:code/pdf`.

line_itemsarray<object> | null

Optional line-item breakdown — `{ description, amount, quantity? }`.

installmentsarray<Installment>

Payment schedule. Empty array for single-payment invoices.

idstring

Installment ID.

ordinalinteger

1-indexed position in the schedule.

amountinteger

Resolved amount in kobo.

amount_kindenum<'fixed' | 'percentage'>

How the merchant originally entered the amount.

amount_inputstring

Original input as a decimal string — kobo amount for `fixed`, percent for `percentage` (e.g. `"33.33"`).

due_datestring

ISO-8601 due date.

statusenum<'pending' | 'paid' | 'overdue'>

Installment state.

paid_atstring | null

ISO-8601 timestamp the installment was settled.

transaction_idstring | null

Transaction that settled this installment, if paid.

metadataobject | null

Arbitrary merchant-supplied key/value pairs.

created_atstring

ISO-8601 creation timestamp.

updated_atstring

ISO-8601 last-update timestamp.

Errors

NOT_FOUND404No invoice with that code in this mode.
UNPROCESSABLE409Invoice is already paid or cancelled.

Mark paid off-platform

POST/v1/invoices/:code/mark-paid

Use when the customer paid via a channel that doesn't flow through TagPay (cash, cheque, transfer to your own bank account). We create an audit-only Transaction with payment_method: bank_transfer and metadata.offline: true — no fee is charged and no wallet is credited because the money never came through us. Every installment is marked paid by the same audit transaction. Fires invoice.paid with source: 'offline'. Only draft, pending, and overdue invoices are eligible.

Path parameters

codestringrequired

The invoice code (INV_…).

Body parameters

notestringoptional

Optional free-text note explaining the off-platform payment (stored on the audit transaction).

Response

200
invoice_codestring

TagPay invoice code (`INV_…`). Use this in every invoice API call.

invoice_numberstring | null

Sequential human-readable invoice number (e.g. `INV-2026-0042`). Allocated when the invoice leaves `draft`; null for drafts.

amountinteger

Total payable in kobo.

subtotalinteger

Pre-tax/pre-discount amount in kobo.

tax_amountinteger

VAT applied in kobo.

discount_amountinteger

Discount applied before tax, in kobo.

vat_ratenumber | null

VAT percent (e.g. `7.5`), or null when no tax applies.

currencystring

Always `NGN`.

statusenum<'draft' | 'pending' | 'paid' | 'overdue' | 'cancelled' | 'uncollectible'>

Lifecycle state.

descriptionstring | null

Short summary shown on the invoice.

notesstring | null

Free-text terms shown on the PDF and hosted page.

due_datestring | null

ISO-8601 due date for the whole invoice (single-payment invoices) or for the overall balance.

paid_atstring | null

ISO-8601 timestamp the invoice was fully settled.

sent_atstring | null

ISO-8601 timestamp the invoice transitioned out of draft.

voided_atstring | null

ISO-8601 timestamp the invoice was cancelled.

marked_paid_atstring | null

ISO-8601 timestamp the invoice was marked paid off-platform.

customer_emailstring | null

Customer email used for delivery.

customer_idstring | null

Linked Customer ID, or null for guest invoices.

transaction_idstring | null

Transaction that settled the invoice.

pdf_urlstring | null

Cached PDF URL. Null today — re-render via `GET /v1/invoices/:code/pdf`.

line_itemsarray<object> | null

Optional line-item breakdown — `{ description, amount, quantity? }`.

installmentsarray<Installment>

Payment schedule. Empty array for single-payment invoices.

idstring

Installment ID.

ordinalinteger

1-indexed position in the schedule.

amountinteger

Resolved amount in kobo.

amount_kindenum<'fixed' | 'percentage'>

How the merchant originally entered the amount.

amount_inputstring

Original input as a decimal string — kobo amount for `fixed`, percent for `percentage` (e.g. `"33.33"`).

due_datestring

ISO-8601 due date.

statusenum<'pending' | 'paid' | 'overdue'>

Installment state.

paid_atstring | null

ISO-8601 timestamp the installment was settled.

transaction_idstring | null

Transaction that settled this installment, if paid.

metadataobject | null

Arbitrary merchant-supplied key/value pairs.

created_atstring

ISO-8601 creation timestamp.

updated_atstring

ISO-8601 last-update timestamp.

Errors

NOT_FOUND404No invoice with that code in this mode.
UNPROCESSABLE409Invoice is paid, cancelled, or uncollectible.

Download invoice PDF

GET/v1/invoices/:code/pdf

Returns the rendered PDF bytes with Content-Type: application/pdf and Content-Disposition: attachment; filename="...". Includes line items, totals, and (when applicable) the installment schedule. No caching today — the PDF is re-rendered on every request.

Path parameters

codestringrequired

The invoice code (INV_…).

Response

200
(binary)application/pdf

PDF document. Filename derives from `invoice_number` (or `invoice_code` for drafts).

Errors

NOT_FOUND404No invoice with that code in this mode.