API reference

Receipts

A paid invoice has a receipt. Read it, or create a signed link to its PDF for your customer.

EndpointWhat it does
GET /api/v1/receipts/{invoiceId}Get a receipt
POST /api/v1/receipts/{invoiceId}/linksCreate a receipt link

Receipts are addressed by the paid invoice's id. Asking for an unpaid invoice's receipt gets 404 not_paid; wait for invoice.paid or receipt.issued.

The receipt object#

The receipt for a paid invoice.

FieldDescription
invoiceIdintegerThe paid invoice.
invoiceNumberstringThe invoice number.
customerIdintegerThe customer.
currencystringISO currency code. One of NGN, USD, CAD, EUR, GBP.
amountnumber (decimal)The invoice total.
paidAttimestamp · nullableWhen it was paid. Server time, no offset.
paymentMethodstring · nullableonline or offline.
Receipt
{
  "invoiceId": 5012,
  "invoiceNumber": "MAX-2026-0042",
  "customerId": 812,
  "currency": "NGN",
  "amount": 860000.00,
  "paidAt": "2026-11-03T14:02:00",
  "paymentMethod": "online"
}

Get a receipt#

GET/api/v1/receipts/{invoiceId}invoices:read

Returns the receipt for a paid invoice.

Path parameters

FieldDescription
invoiceIdintegerrequired The paid invoice's id.

Request

curl "$FLUX_BASE_URL/api/v1/receipts/5012" \
  -H "Authorization: ApiKey $FLUX_API_KEY"

Responses

200 OK
200 OK
{
  "invoiceId": 5012,
  "invoiceNumber": "MAX-2026-0042",
  "customerId": 812,
  "currency": "NGN",
  "amount": 860000.00,
  "paidAt": "2026-11-03T14:02:00",
  "paymentMethod": "online"
}
5 possible errors
StatusCodeWhen
404not_foundUnknown id, or an id that belongs to another organization.
404not_paidYou asked for the receipt of an unpaid invoice.
401unauthorizedNo API key, an unknown key or a revoked key.
403insufficient_scopeThe key lacks the scope. details names it: { "required": "invoices:write" }.
429rate_limitedToo many requests for this key. Wait for the Retry-After seconds.
POST/api/v1/receipts/{invoiceId}/linksinvoices:read

Returns a signed link to the receipt PDF. payUrl is always null here.

Path parameters

FieldDescription
invoiceIdintegerrequired The paid invoice's id.

Request

curl -X POST "$FLUX_BASE_URL/api/v1/receipts/5012/links" \
  -H "Authorization: ApiKey $FLUX_API_KEY"

Responses

200 OK
200 OK
{
  "pdfUrl": "https://api.flux.example/public/receipts/NDIuNTAxMi5ycC4xNzk2MTE2NDAw.Zt4hQ1vB8kW0mXc3sR7eLp2yN6uGaJ9oFdKiT5wHqEs/pdf",
  "payUrl": null,
  "expiresAt": "2026-12-01T10:00:00.5236411Z"
}
6 possible errors
StatusCodeWhen
404not_foundUnknown id, or an id that belongs to another organization.
404not_paidYou asked for the receipt of an unpaid invoice.
503links_not_configuredThe server has no link-signing key configured.
401unauthorizedNo API key, an unknown key or a revoked key.
403insufficient_scopeThe key lacks the scope. details names it: { "required": "invoices:write" }.
429rate_limitedToo many requests for this key. Wait for the Retry-After seconds.