FleetbaseFleetbase

Public Invoices

Public invoices let customers view and pay invoices without signing in to Fleetbase. Use these endpoints to retrieve invoice details, list available gateways, and start or record payment.

The Public Invoice object

A public invoice is the customer-facing representation of a Ledger invoice. It includes invoice totals, dates, line items, customer data when available, and payment state.
Attributes
idstringoptional

Public identifier of the invoice.

public_idstringoptional

Public identifier of the invoice.

customerobjectoptional

Customer associated with the invoice, when loaded.

orderobjectoptional

Related order, when loaded.

transactionobjectoptional

Related transaction, when loaded.

templateobjectoptional

Invoice template, when loaded.

numberstringoptional

Invoice number.

statusstringoptional

Invoice status.

datedateoptional

Invoice issue date.

due_datedateoptional

Invoice due date.

currencycurrencyoptional

Invoice currency code.

subtotalintegeroptional

Subtotal in the smallest currency unit.

taxintegeroptional

Tax amount in the smallest currency unit.

total_amountintegeroptional

Total invoice amount in the smallest currency unit.

amount_paidintegeroptional

Amount paid in the smallest currency unit.

balanceintegeroptional

Remaining balance in the smallest currency unit.

notesstringoptional

Invoice notes.

termsstringoptional

Invoice payment terms.

itemsarray of objectsoptional

Invoice line items.

metaobjectoptional

Arbitrary metadata stored with the invoice.

sent_attimestampoptional

Time the invoice was sent.

viewed_attimestampoptional

Time the invoice was first viewed publicly.

paid_attimestampoptional

Time the invoice was paid.

created_attimestampoptional

Time the invoice was created.

updated_attimestampoptional

Time the invoice was last updated.

The Public Invoice object
{
  "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"
}
GET/public/invoices

Get Public Invoice

Retrieves the public view of an invoice by public ID or UUID. Draft invoices are not available through the public invoice URL.

GET/public/invoices
curl https://api.fleetbase.io/public/invoices \
  -H "Authorization: Bearer flb_live_…"
GET/public/invoices/gateways

List Public Invoice Gateways

Lists active payment gateways available for a public invoice. Gateway credentials and sensitive configuration are never returned.

GET/public/invoices/gateways
curl https://api.fleetbase.io/public/invoices/gateways \
  -H "Authorization: Bearer flb_live_…"
POST/public/invoices/pay

Pay 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.

Body parameters
gateway_idstringrequired

Public ID of the payment gateway to use for the invoice payment.

referencestringoptional

Customer-provided payment reference or note.

POST/public/invoices/pay
curl -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}}"
}'
Public Invoices | Fleetbase