402, it signs a TransferFactory_Transfer, attaches it as proof, and retries automatically. The facilitator relays it and pays the traffic fee, so you never pay gas. See How Payments Work for the full flow.
Quickstart
CLI reference
All commands read the relay fromCANTON_AGENT_RELAY_URL (or --relay-url).
For POST bodies (e.g. LLM inference), use
makePayingFetch from the SDK instead of pay.
SDK usage
Registry tokens (e.g. USDCx)
The wallet handles CIP-56 registry tokens alongside CC, with two safe-by-default opt-ins:- Receive: trust a token’s registrar with
CANTON_AGENT_REGISTRY_TRUSTED_PARTIES(USDCx is built in). Untrusted registrars’ transfers are skipped byclaim. - Spend: consent with
CANTON_AGENT_PAYABLE_INSTRUMENTS="<registrar>::1220...|USDCx"(default: CC only), so a merchant cannot make you pay in a token you did not opt into.
pay needs no --admin/--id - the instrument comes from the merchant’s 402; you only opt in to spending it.
Reference
Environment variables
Wallet file -
~/.canton-agent/wallet.json, mode 0600, holds the Ed25519 key and party id. Back it up; losing it loses the funds it holds.
First-request latency - the first payment after a cold start warms the SV Scan caches (AmuletRules 5 min TTL, OpenMiningRound 30 s TTL); subsequent payments typically complete in 10 to 25 seconds on mainnet.