agentaos.invoices reads those records and downloads their documents. There’s no create, invoices are generated by AgentaOS when a payment confirms.
invoices.list(params?)
string
ISO 8601 date, inclusive lower bound.
string
ISO 8601 date, inclusive upper bound.
'all' | 'issued' | 'paid' | 'voided'
number
default:"20"
Max 5000.
number
default:"0"
PaginatedList<Invoice>.
Invoice fields
string
string
string | null
string
e.g.
'INV-2026-0001'.number
Currency units, in
paymentToken.string
string
The token the buyer paid with, e.g.
'EURC'.string | null
string | null
On-chain settlement transaction, if applicable.
string
number | null
EUR/USD equivalent, currency units.
string | null
'EUR' or 'USD'.number | null
Rate applied at settlement.
string | null
string | null
ISO 8601.
string | null
string | null
string | null
string | null
string
number | null
e.g.
19 for 19%.number | null
Currency units.
boolean | null
string | null
e.g.
'DE VAT'.string | null
ISO 3166-1 alpha-2.
string | null
string | null
string | null
string | null
'issued' | 'paid' | 'voided'
string
ISO 8601.
string | null
ISO 8601.
string
ISO 8601.
amount, fiatAmount, and taxAmount are plain decimal currency-unit numbers, not minor units. 19.99 means €19.99. See the money model.invoices.retrieve(id)
Invoice shape above for a single record.
invoices.void(id)
status to 'voided' and stamps voidedAt. The record is retained, retrieve() still returns it.
Downloads
Every download method returns raw bytes, not a parsed JSON object. PDFs come back asBuffer, the CSV export comes back as string.
string
required
ISO 8601 date. Required for
downloadStatement, optional for exportCsv.string
required
ISO 8601 date. Required for
downloadStatement, optional for exportCsv.string
exportCsv only, optional.exportCsv’s params are all optional: { from?: string; to?: string; status?: string }. downloadStatement requires both from and to.
invoices.sendReceipt(id)
Re-sends the receipt email to the buyer on file. Paid invoices only.
true
string
The email address the receipt was sent to.
Next steps
Checkouts
invoiceId/invoiceNumber on a completed checkout point back here.Customers
The buyers these invoices are billed to.
Errors
What a missing or already-actioned invoice ID throws.