How AI agents pay with x402
x402 turns the standard HTTP 402 (Payment Required) status code into a machine-readable checkout in USDC (usually on Base, CAIP-2 eip155:8453). An AI agent needs no account, no human typing a card number, and no pre-issued API key: it reads the price from the 402 challenge, signs an authorization within its spend limits, and retries the same HTTP request.
The 4-step x402 HTTP 402 flow
- 1Call the endpoint unpaid
The agent makes a normal GET or POST request to the API route. Nothing is spent to discover the price.
- 2Read the HTTP 402 challenge
The server answers HTTP 402 with an accepts[] array in the JSON body (and base64 in the PAYMENT-REQUIRED header on x402 v2) stating the exact scheme, network (such as eip155:8453), token contract, atomic amount, and payTo address.
- 3Sign an off-chain USDC transfer authorization
If the price fits the agent wallet budget, the wallet signs an EIP-3009 transferWithAuthorization payload (no gas transaction broadcast by the agent itself) and sends it in the PAYMENT-SIGNATURE header (or X-PAYMENT on v1).
- 4Verify, settle, and receive HTTP 200
The server (or its x402 facilitator) verifies the signature, settles the USDC transfer on-chain, and returns the API response along with a PAYMENT-RESPONSE receipt header.
# Step 1: Agent sends a normal HTTP request with no API key
GET /api/v1/pro HTTP/2
Host: satbotly.com
# Step 2: Server returns HTTP 402 + x402 v2 payment requirements
HTTP/2 402
PAYMENT-REQUIRED: <base64 JSON>
{"x402Version":2,"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"9000000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0xeDb324E75A7dD36846576b8D46d3b43D7Df4f0FA","maxTimeoutSeconds":300}]}
# Step 3: Agent wallet signs an EIP-3009 USDC authorization and retries
GET /api/v1/pro HTTP/2
PAYMENT-SIGNATURE: <base64 PaymentPayload>
# Step 4: Server verifies + settles via facilitator and returns HTTP 200
HTTP/2 200
PAYMENT-RESPONSE: <base64 settlement receipt>You can inspect a live x402 v2 402 response right now without paying: curl -i -s https://satbotly.com/api/v1/pro. More IDE examples: /from-agent-ide.
Wallets and buyer tools that let an agent pay x402
54 wallets in our leaderboard list the x402 rail. Top 10 by verified agent-readiness score (out of 7):
- Agent402 · score 7 / 7 ·
- AbaPay · score 6 / 7 ·
- mcp · score 6 / 7 ·
- agentic-wallet-guardian-v3 · score 5 / 7 ·
- bolthub-sdk · score 5 / 7 ·
- leashd · score 5 / 7 ·
- lightning-enable-mcp · score 5 / 7 ·
- 402-mcp · score 4 / 7 ·
- agentwallet-mcp · score 4 / 7 ·
- Alby Account · score 4 / 7 ·
All 54 x402 wallets → · All 64 x402 MCP servers →
Cheapest 10 live x402 APIs (from unpaid probes)
Every endpoint below answered HTTP 402 to our unpaid probe. Prices are read straight from the x402 challenge:
- x402wrapper · $0.0001 (USDC (x402)) · x402-wrapper.onrender.com
- API Acre — Base block inspection · $0.0010 (USDC (x402)) · API Acre
- Agent402 hash (MPP) (x402) · $0.0010 (USDC (x402)) · Havok Holdings LLC
- Agent402 stock-quote (MPP) (x402) · $0.0010 (USDC (x402)) · Havok Holdings LLC
- AgentIndex can-pay (MPP) · $0.0010 (USDC (x402)) · AgentIndex
- Ankr Monad RPC (JSON-RPC call) · $0.0010 (USDC (x402)) · Ankr
- Base ERC-20 Allowance Check · $0.0010 (USDC (x402)) · base-onchain-tools
- Base Gas Oracle · $0.0010 (USDC (x402)) · market
- Brand Extractor — logos, colors and fonts (alias) · $0.0010 (USDC (x402)) · Brand Extractor
- Brand Extractor — website logos, colors & fonts · $0.0010 (USDC (x402)) · Brand Extractor
25 cheapest x402 APIs → · All 367 x402 APIs → · x402 vs L402 comparison →
Plain-English meanings
- x402
- The same pay-first idea for APIs, but paid in USDC (a dollar stablecoin) instead of Bitcoin.
- HTTP 402
- “Payment Required”: a web status code a server sends when a request has to be paid for first.
- USDC
- A digital dollar: a crypto token meant to always be worth one US dollar.
- MCP
- Model Context Protocol: a standard way to plug tools, like a wallet, into an AI assistant.
- AI agent
- Software that takes actions for you, such as buying an API call, without a person clicking each step.
Data as of 2026-10-24. How we check: /method.