API reference

Billing

Public balance, rate card, ledger, and invoice endpoints.

Balance

GET/v1/billing/balance

Response

FieldTypeNotes
objectrequired"credit_balance"
organization_idrequiredstring
balance_brlrequiredstring
currencyrequired"brl"
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Current rate card

GET/v1/rate-cards/current

Response

FieldTypeNotes
idrequiredstring
objectrequired"rate_card"
namerequiredstring
currencyrequired"brl"
effective_fromrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
effective_torequiredstring<ISO-8601> | null
entriesrequiredobject[]

Ledger

GET/v1/billing/ledger

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null

Entry shape

FieldTypeNotes
idrequiredstring
objectrequired"ledger_entry"
typerequired"debit" | "credit"
source_typerequired"usage" | "credit_topup"
source_idrequiredstring
meter_idrequiredstring | null
amount_brlrequiredstring
uncollected_brlrequiredstring | null
currencyrequired"brl"
environmentrequired"sandbox" | "production" | null
recorded_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
trace_idrequiredstring | null

Self-serve billing endpoints

Credit packages (GET /v1/billing/packages, POST /v1/billing/packages/purchase), saved payment methods (GET/POST /v1/billing/payment-methods, setup-intent, default, DELETE), auto top-up (GET/PUT /v1/billing/auto-topup), and the full rate-card list (GET /v1/rate-cards) are public API endpoints documented in /openapi.json. Writes require billing:write.

Dashboard-only billing actions

Custom-amount top-ups, invoice builds, and spend-limit updates are dashboard control-plane workflows, not public customer API endpoints. They are intentionally excluded from /openapi.json.

Invoices

GET/v1/invoices

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null
GET/v1/invoices/{'{id}'}/download

Response

FieldTypeNotes
objectrequired"invoice_download"
invoice_idrequiredstring
urlrequiredstring
expires_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$