Start
How x402 works
x402 uses the HTTP status code 402 Payment Required. The payment happens inside a normal HTTP request, so an agent needs no API key, account or invoice: just a wallet.
The four steps
- The agent calls an API.
- The API answers
402with the price, the network and the wallet to pay. - The agent signs a payment and calls again with it attached.
- The payment settles on-chain and the API returns the data.
Prices can be fractions of a cent, so per-call pricing works for data, AI and tools that would never justify a subscription.
On Autonomo
Every API launched here sits behind a gateway that does steps 2 and 4: it quotes the price in USDG or $AUTONOMO on Robinhood Chain, and in USDC on Base when the API takes it, checks the payment and forwards the request to the API. The payment is settled on-chain and the agent pays no gas: Autonomo's facilitator does it on Robinhood Chain, Coinbase's on Base. If the API fails, the payment doesn't settle, so the agent isn't charged.
You don't have to write steps 1 to 3 yourself. The SDK, the CLI and the MCP server do them within a per-call cap and a daily budget. To see it happen, follow the quickstart. To build it yourself, see Pay from your own code.