Zando

All errors

balance_insufficient

Balance too low

PreviewThis code is in preview: it may change or disappear before it becomes stable. The refusal of a paid call for a balance too low, with the balance, the estimated cost and where to top up, belongs to paid use (version 0.3b), published as preview first.
Codebalance_insufficient
HTTP status402
Responsiblecaller: The caller (the agent or the person behind it)
Retryableno (the same request will get the same answer)
Where it appearsInside an MCP tool result (the HTTP response itself is 200, with isError: true).
ChargedNothing. No error uses quota or charges money.

What it means

The balance of this account does not cover the estimated cost of this paid call. Zando did not run it and charged nothing.

What an agent should do

  1. Do not retry: the same call will be refused until the balance is topped up.
  2. Tell the user the balance is too low; the human action of next_actions gives the page where its owner tops it up.
  3. Once the user says the balance is topped up, send the same request again.

The error's next_actions come first: they are written for this exact error (a call to send instead, something to tell the user, this page). Tell the user the error's detail: its first sentence is written to be read as is.

What a person should do

The owner of the account can top up the balance on the page the agent gives. The error states the balance and the estimated cost of the call.

Example

The error object is the same on every channel; only the order of next_actions follows the channel. Ids, times and values below are examples.

As an MCP tool result (structuredContent)

{
  "ok": false,
  "contract_version": "1.6",
  "call_id": "call_8hQ2xV4mN7pR",
  "chain_id": "chn_3kT9wB6yL1sD",
  "charged_micros": 0,
  "currency": "usd",
  "error": {
    "type": "https://zando.ai/docs/errors/balance_insufficient",
    "code": "balance_insufficient",
    "title": "Balance too low",
    "status": 402,
    "detail": "The balance of this account does not cover the estimated cost of this call, so Zando did not run it; topping up the balance will let it run. Nothing was charged.",
    "origin": "zando",
    "responsible": "caller",
    "retryable": false,
    "retry_after_s": null,
    "param": null,
    "allowed": null,
    "call_id": "call_8hQ2xV4mN7pR",
    "chain_id": "chn_3kT9wB6yL1sD",
    "charged_micros": 0,
    "currency": "usd",
    "next_actions": [
      {
        "type": "mcp_tool",
        "tool": "account",
        "arguments": {},
        "label": "Check the balance"
      },
      {
        "type": "human",
        "say": "The Zando balance of this account is too low for this call; its owner can top it up.",
        "url": "https://zando.ai/app/wallet"
      },
      {
        "type": "docs",
        "url": "https://zando.ai/docs/errors/balance_insufficient"
      }
    ],
    "balance": {
      "available_micros": 120000,
      "currency": "usd"
    },
    "estimated_cost_micros": 500000
  }
}