List settlements
Lists the caller's x402 receipts, newest first: as payer, what its ledger paid; as payee, what it was paid — each settled payment with what it bought, both parties, the exact amount and when.
GET /v1/x402/settlements
| Address | https://api.hanzo.ai/v1/x402/settlements |
| Method | GET |
| Operation | get_x402_settlements |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Lists the caller's x402 receipts, newest first: as payer, what its ledger paid; as payee, what it was paid — each settled payment with what it bought, both parties, the exact amount and when. A payer is the org whose ledger is debited, which for a SuperAdmin inspecting another org is still its own; a payee is the caller's own org. An unsettled claim is not a receipt and is never listed.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
role | query | string | — | Role is payer — what the caller's org paid — or payee — what it was paid. |
year | query | integer | — | Year keeps the calendar year (UTC) the payments settled in. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | x402.settlementList | ok |
default | problem-details | refused |
200 body — 14 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
settlements | body | x402.Receipt[] | — | Settlements is at most 1000 receipts. |
settlements[].amount | body | string | — | Amount is what actually moved, as an exact 18-decimal-place USD string. |
settlements[].category | body | string | — | Category is what the payment was for — service, goods, transfer or royalty — as the price table said it: a tool call is a service, a job is what its parties agreed. |
settlements[].from | body | string | — | From is the payer's EVM address: the account that signed the EIP-3009 authorization, recovered from the signature rather than taken on trust. |
settlements[].id | body | string | — | ID is the settle-once key: "x402_" + keccak(from|nonce) in hex. |
settlements[].network | body | string | — | Network is the CAIP-2 identifier the payment was settled under, e.g. "eip155:36963". |
settlements[].nonce | body | string | — | Nonce is the client-chosen nonce from the authorization, hex — up to 32 bytes, left-padded to the contract's bytes32. |
settlements[].payee | body | string | — | Payee is the recipient's EVM address — the payTo the challenge advertised and the authorization named. |
settlements[].payeeOrg | body | string | — | PayeeOrg is the tenant that owns the recipient wallet, resolved at settlement. |
settlements[].payer | body | string | — | Payer is the payer ORG — the tenant whose ledger was debited — and not an address. |
settlements[].resource | body | string | — | Resource is what was paid for, in the same spelling the price table and the challenge used: the request path for a priced route, "tool:<id>" for a priced tool. |
settlements[].settledAt | body | integer (int64) | — | SettledAt is when this settlement was CLAIMED, in unix seconds — the moment the authorization was accepted, which is also the moment the time window it carried stopped applying. |
settlements[].settledVia | body | string | — | SettledVia is which rail moved the money: "ledger", the live default, or "chain" when the authorization is broadcast. |
settlements[].txHash | body | string | — | TxHash is the chain transaction hash, present only for a "chain" settlement. |
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.
import { Configuration, X402Api } from 'hanzoai';
const api = new X402Api(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getX402Settlements();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import X402Api
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = X402Api(client).get_x402_settlements()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.X402API.GetX402Settlements(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, x402_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = x402_api::get_x402_settlements(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.X402Api;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new X402Api(client).getX402Settlements();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/x402/settlements \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches x402 through the x402 tool, which names its 1 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "get_x402_settlement"
}
}
}'How is this guide?