Skip to main content

Commands

The wallet is per-agent, so these commands need an active user (naive use <alice>). Unlike cards, there is no company-level fallback mount.

Quote

Probes the URL and returns its payment requirements without paying. Zero side effects — the wallet is not even loaded, so this is the safe way to learn a price. If the resource is not paywalled, returns free: true with the real HTTP status.
The accepts[].amount in a quote is in atomic units. USDC has 6 decimals, so 500000 = 0.50 USDC. --max-amount on pay is a decimal amount (0.50), not atomic units.

Pay

Fetches the resource; if it returns 402, signs a USDC payment from the agent’s wallet, retries the request once with the payment attached, and returns the resource body plus a receipt. Sensitive — this spends real USDC. There is deliberately no approval queue. What bounds a payment:
  1. The wallet balance — an agent cannot spend what isn’t there.
  2. perTxMax — enforced at runtime and as a static policy inside the custody plane at signing time. Set it with naive wallet policy.
  3. dailyBudget (optional) — a rolling runtime counter.
  4. --max-amount — a ceiling on this one call. The effective cap is min(--max-amount, perTxMax).
If the resource returns something other than 402, no payment is made — the response comes back with paid: false and no receipt.

Receipts

Every settled x402 payment is recorded here, each linking the payment to its onchain transaction (txHash). Amounts on a receipt are decimal USDC strings.