ExchainDocs
DocsAPI

APIx402Get fee status

Get fee status

Fees charged, paid and due for a guarded Safe, per token.

GET
/v1/x402/wallets/{walletId}/fees

What an x402 wallet was charged (bps of every guarded payment that landed), what it paid, and what is due. Fees accrue per token, in the token that was paid; the top-level amounts are the first governed token’s and assets has each token’s. A payment in a token whose due reached settleAt returns 402 fee_due. Shadow wallets and fee-exempt nodes are not charged.

Authorization

nodeToken
headerAuthorizationBearer <token>

Node Token from the Exchain console. Works for wallets this node registered; the node’s network (preprod or mainnet) decides the network of the request. Use a preprod token in the playground.

Path Parameters

walletId*string

x402 wallet id.

Match^wal_[0-9A-HJKMNP-TV-Z]{26}$

Response Body

Fee status.

application/json
  1. response
walletId*WalletId
Match^wal_[0-9A-HJKMNP-TV-Z]{26}$
charged*boolean

False for a shadow wallet, a licensed node's wallet, or a network without fees.

bps*integer

Basis points of every guarded payment that lands.

settleAt*Amount
Match^[0-9]+$
payTo?EvmAddress
Match^0x[0-9a-fA-F]{40}$
accrued*Amount
Match^[0-9]+$
pending*Amount
Match^[0-9]+$
paid*Amount
Match^[0-9]+$
due*Amount
Match^[0-9]+$
settlements*array<>
assets?array<>

Each governed token’s fees, the first first. Fees accrue and settle in the token that was paid; the top-level amounts are the first token’s.

asOf*string
Match^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
Formatdate-time
schemaVersion*string

Wire schema version, "1.1" today.

Value in"1.0""1.1"
chainTip*|null
Example Request
curl -X GET 'https://cosign.exchain.network/v1/x402/wallets/wal_01M53M3ZNQQ4DDNPE4262QAZ28/fees'
Example Response
{  "walletId": "wal_01M53M3ZNQQ4DDNPE4262QAZ28",  "charged": true,  "bps": 50,  "settleAt": "1000000",  "payTo": "0x1f3e5d7c9b2a4068f1e3d5c7b9a20486e8d1f3a5",  "accrued": "1000005",  "pending": "0",  "paid": "1000005",  "due": "0",  "settlements": [    {      "nonce": "0xfd6970eb162fc642aea37658ec7b4ebc985937787aaaa1ac8e01f24a51ba1dd8",      "amount": "1000005",      "validBefore": 1793974327,      "status": "paid"    }  ],  "assets": [    {      "asset": "eip155:84532/erc20:0x036cbd53842c5426634e7929541ec2318f3dcf7e",      "symbol": "USDC",      "decimals": 6,      "accrued": "1000005",      "pending": "0",      "paid": "1000005",      "due": "0"    }  ],  "asOf": "2026-11-05T14:22:07.318Z",  "schemaVersion": "1.1",  "chainTip": null}

Errors

StatusCodeMeaning
401unauthorizedThe bearer credential is missing, unknown or revoked.
404not_foundThe wallet is not an x402 wallet of this node.

Every code and what to do about it: Errors and codes.