Hanzo
OpenapiBilling

Answers the org's own postings inside `range=`, each as a signed entry: a…

Answers the org's own postings inside `range=`, each as a signed entry: a DEPOSIT CREDITS the wallet (positive, account `credits:<org>`) and every other…

GET /v1/billing/ledger

Addresshttps://api.hanzo.ai/v1/billing/ledger
MethodGET
Operationget_billing_ledger
AuthAuthorization: Bearer $HANZO_API_KEY

Answers the org's own postings inside range=, each as a signed entry: a DEPOSIT CREDITS the wallet (positive, account credits:<org>) and every other posting DEBITS it (negative, account usage:<org>), described by its notes or its tags. The sign is the posting's own meaning, read through ONE vocabulary shared with the ledger that wrote it — a reader with its own spelling for deposit rendered a customer's grant as a charge.

This is the closest projection of the truth. The org's double-entry postings are the source of record — balanced, only ever appended, one file per org — and this lane is that list, wider than either half of it: the deposits are the grants /v1/billing/credits lists and the debits are the spend /v1/billing/usage rolls up. It answers 503 where this deployment runs no ledger, rather than reporting an empty wallet.

A row whose timestamp will not parse is KEPT rather than dropped — a malformed date must show up in a money list, not vanish from it. balanceCents is omitted: these are MOVEMENTS, and the standing balance is /v1/billing/balance.

Cents are ROUNDED from the ledger's exact 18-decimal USD. Scoped to the caller's own org, where the org's ledger file is the tenant boundary; 401 without a validated principal.

Request

1 field.

FieldInTypeRequiredDescription
rangequerystringRange is the window: 24h, 7d, 30d or 90d.

Response

StatusBodyMeaning
200financeLedgerEntry[]ok

200 body — 7 fields.

FieldInTypeAlwaysDescription
[].accountbodystring
[].balanceCentsbodyinteger
[].centsbodyinteger
[].currencybodystring
[].datebodystring
[].descriptionbodystring
[].idbodystring

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Billing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page