# Billing

URL: https://docs.hanzo.ai/docs/cli/billing

> The `hanzo billing` commands.

Also for this capability: [API](https://docs.hanzo.ai/docs/openapi/billing) · **CLI** · [MCP](https://docs.hanzo.ai/docs/mcp-tools/billing) · [SDKs](https://docs.hanzo.ai/docs/sdks)

Your org's balance, what it has spent, and the cards it pays with.

[API reference →](https://docs.hanzo.ai/docs/openapi/billing)

```bash
hanzo billing alerts list
```

Every command takes `--json` for the raw response and `--help` for its own flags. Sign in once with `hanzo auth login`; the commands below use that session, and the org they act in is the one it carries.

| Command                  | What it does                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `hanzo billing balance`  | Prepaid credit the caller's org can still spend                                                                                                                                                                                                                                                                                                                                                              |
| `hanzo billing credits`  | Lists the caller's credit grants — every one of them, spent and lapsed and voided included.                                                                                                                                                                                                                                                                                                                  |
| `hanzo billing ledger`   | Answers the org's own postings inside `range=`, each as a signed entry: a DEPOSIT CREDITS the wallet (positive, account `credits:&lt;org&gt;`), a HOLD sets money aside for a payment agreed and not yet made (negative, account `held:&lt;org&gt;`) and its return gives it back (positive), and every other posting DEBITS it (negative, account `usage:&lt;org&gt;`), described by its notes or its tags. |
| `hanzo billing mode`     | Moves this org between sandbox money and real money.                                                                                                                                                                                                                                                                                                                                                         |
| `hanzo billing payouts`  | Answers the org's outbound payouts, newest first — amount, destination, status, and the failure reason where one applies.                                                                                                                                                                                                                                                                                    |
| `hanzo billing plans`    | The plan catalog, priced with whatever offer is in force                                                                                                                                                                                                                                                                                                                                                     |
| `hanzo billing settings` | Answers the PUBLIC half of this org's processor configuration — the ids a browser needs to tokenize a card, and the environment it must tokenize against.                                                                                                                                                                                                                                                    |
| `hanzo billing tier`     | Answers which tier the caller is on, what it allows, and what is left to spend.                                                                                                                                                                                                                                                                                                                              |
| `hanzo billing wire`     | Answers where to send a wire top-up: the receiving bank details, with the caller's own payment reference.                                                                                                                                                                                                                                                                                                    |

### Accounts

| Command                               | What it does                                                                                                                  |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `hanzo billing accounts list`         | Answers the caller's billing accounts: the org itself, its currency, when it was opened, and the caller's own standing in it. |
| `hanzo billing accounts members <id>` | Answers one billing account's roster.                                                                                         |

### Alerts

| Command                            | What it does                                                                                                             |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `hanzo billing alerts authorize`   | Answers whether one proposed spend fits inside this org's caps.                                                          |
| `hanzo billing alerts create`      | Opens a spend cap on the caller's own org.                                                                               |
| `hanzo billing alerts list`        | Lists this org's spend caps: the ceiling, its scope, whether it enforces, and how much of it has been spent this period. |
| `hanzo billing alerts rm <id>`     | Removes one of the caller's spend caps and answers 204.                                                                  |
| `hanzo billing alerts update <id>` | Changes one spend cap: raise or lower the ceiling, flip enforcement, retune the rate limit.                              |

### Credit balance

| Command                                  | What it does                                                                                                                 |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `hanzo billing credit-balance breakdown` | Answers that same spendable credit split by grant tag, with the earliest expiry under each and the total across all of them. |
| `hanzo billing credit-balance get`       | Answers what the caller can spend right now, one entry per currency.                                                         |

### Crypto

| Command                                 | What it does                                                                            |
| --------------------------------------- | --------------------------------------------------------------------------------------- |
| `hanzo billing crypto deposit create`   | Issues a deposit address the caller can send crypto to, on the asset they ask for.      |
| `hanzo billing crypto deposit get <id>` | Reads one of the caller's own deposit intents back — pending, confirming, or succeeded. |
| `hanzo billing crypto options`          | Answers which chains and tokens the crypto rail accepts — what an asset picker renders. |

### Invoices

| Command                               | What it does                                                           |
| ------------------------------------- | ---------------------------------------------------------------------- |
| `hanzo billing invoices collect <id>` | Collect an issued invoice from credits, balance, then card             |
| `hanzo billing invoices create`       | Raise a draft invoice against a customer                               |
| `hanzo billing invoices get <id>`     | Read one invoice                                                       |
| `hanzo billing invoices issue <id>`   | Issue a draft invoice, making it collectible                           |
| `hanzo billing invoices list`         | Lists the caller's invoices, newest first, with the count beside them. |
| `hanzo billing invoices pdf <id>`     | Download one invoice as a PDF                                          |
| `hanzo billing invoices void <id>`    | Void a draft or issued invoice                                         |

### Methods

| Command                         | What it does                                      |
| ------------------------------- | ------------------------------------------------- |
| `hanzo billing methods create`  | Save a card or account for the caller             |
| `hanzo billing methods list`    | Cards and accounts on file for the caller         |
| `hanzo billing methods rm <id>` | Removes one card or account the caller has saved. |

### Portal

| Command                                | What it does                                                                                      |
| -------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `hanzo billing portal methods create`  | Save a card or account for the caller                                                             |
| `hanzo billing portal methods list`    | Cards and accounts on file for the caller                                                         |
| `hanzo billing portal methods rm <id>` | Removes one card or account the caller has saved, at the address a hosted checkout reaches it by. |

### Recharge

| Command                          | What it does                                                                                                                                              |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hanzo billing recharge get`     | Reads the caller's auto-reload rule: top the balance up by `amountCents` whenever it falls below `thresholdCents`, charging the card on file off-session. |
| `hanzo billing recharge replace` | Sets the caller's auto-reload rule, and answers with the rule as stored.                                                                                  |
| `hanzo billing recharge run-all` | Sweeps every org's auto-recharge and answers what it did.                                                                                                 |

### Subscribe

| Command                        | What it does           |
| ------------------------------ | ---------------------- |
| `hanzo billing subscribe card` | Buy a plan with a card |

### Subscriptions

| Command                                       | What it does                                                  |
| --------------------------------------------- | ------------------------------------------------------------- |
| `hanzo billing subscriptions cancel <id>`     | End a subscription                                            |
| `hanzo billing subscriptions list`            | Lists the plans the caller holds, with the count beside them. |
| `hanzo billing subscriptions reactivate <id>` | Put a canceled subscription back on its plan                  |

### Top-up

| Command                      | What it does                                                      |
| ---------------------------- | ----------------------------------------------------------------- |
| `hanzo billing topup create` | Charges a card the caller already saved and credits the balance.  |
| `hanzo billing topup token`  | Charges a single-use card token and credits the caller's balance. |

### Transactions

| Command                               | What it does                                                                                                        |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `hanzo billing transactions get <id>` | Reads one ledger entry by its id.                                                                                   |
| `hanzo billing transactions list`     | Answers one page of the caller's own ledger, newest first: what moved, how much, when, and what it was tagged with. |

### Usage

| Command                        | What it does                                                                                                                                                                                  |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `hanzo billing usage accounts` | Answers per-account totals for the linked provider accounts the gateway ROUTED this caller's traffic through — requests, prompt and completion tokens, recorded cost — plus their honest sum. |
| `hanzo billing usage create`   | Debits one act an application metered to the org it acts for, and answers the receipt.                                                                                                        |
| `hanzo billing usage get`      | Every billed call the caller's org made, attributed to a product                                                                                                                              |
| `hanzo billing usage rollup`   | Answers the caller's month: what their plan includes, what has been consumed against it, and the wallet beside it.                                                                            |
