Public Invoices
The Public Invoice object
idstringoptionalPublic identifier of the invoice.
public_idstringoptionalPublic identifier of the invoice.
customerobjectoptionalCustomer associated with the invoice, when loaded.
orderobjectoptionalRelated order, when loaded.
transactionobjectoptionalRelated transaction, when loaded.
templateobjectoptionalInvoice template, when loaded.
numberstringoptionalInvoice number.
statusstringoptionalInvoice status.
datedateoptionalInvoice issue date.
due_datedateoptionalInvoice due date.
currencycurrencyoptionalInvoice currency code.
subtotalintegeroptionalSubtotal in the smallest currency unit.
taxintegeroptionalTax amount in the smallest currency unit.
total_amountintegeroptionalTotal invoice amount in the smallest currency unit.
amount_paidintegeroptionalAmount paid in the smallest currency unit.
balanceintegeroptionalRemaining balance in the smallest currency unit.
notesstringoptionalInvoice notes.
termsstringoptionalInvoice payment terms.
itemsarray of objectsoptionalInvoice line items.
metaobjectoptionalArbitrary metadata stored with the invoice.
sent_attimestampoptionalTime the invoice was sent.
viewed_attimestampoptionalTime the invoice was first viewed publicly.
paid_attimestampoptionalTime the invoice was paid.
created_attimestampoptionalTime the invoice was created.
updated_attimestampoptionalTime the invoice was last updated.
{
"id": "invoice_7fJ3kQ9",
"public_id": "invoice_7fJ3kQ9",
"customer": null,
"order": null,
"transaction": null,
"template": null,
"number": "INV-1007",
"status": "sent",
"date": "2026-05-07",
"due_date": "2026-05-21",
"currency": "USD",
"subtotal": 12500,
"tax": 0,
"total_amount": 12500,
"amount_paid": 0,
"balance": 12500,
"notes": "Thank you for your business.",
"terms": "Due on receipt.",
"items": [],
"meta": {},
"sent_at": "2026-05-07T09:30:00Z",
"viewed_at": null,
"paid_at": null,
"created_at": "2026-05-07T09:30:00Z",
"updated_at": "2026-05-07T09:30:00Z"
}/public/invoicesGet Public Invoice
Retrieves the public view of an invoice by public ID or UUID. Draft invoices are not available through the public invoice URL.
/public/invoicescurl https://api.fleetbase.io/public/invoices \
-H "Authorization: Bearer flb_live_…"/public/invoices/gatewaysList Public Invoice Gateways
Lists active payment gateways available for a public invoice. Gateway credentials and sensitive configuration are never returned.
/public/invoices/gatewayscurl https://api.fleetbase.io/public/invoices/gateways \
-H "Authorization: Bearer flb_live_…"/public/invoices/payPay Public Invoice
Initiates or records payment for a public invoice. Stripe gateways return a checkout URL, while non-redirect gateways record the invoice payment immediately.
gateway_idstringrequiredPublic ID of the payment gateway to use for the invoice payment.
referencestringoptionalCustomer-provided payment reference or note.
/public/invoices/paycurl -X POST https://api.fleetbase.io/public/invoices/pay \
-H "Authorization: Bearer flb_live_…" \
-H "Content-Type: application/json" \
-d '{
"gateway_id": "{{gateway_id}}",
"reference": "{{payment_reference}}"
}'