What is x402?

Written by , Product docsLast updated

x402 is Coinbase's open standard for stablecoin pay-per-request payments over HTTP — repurposing the dormant HTTP 402 "Payment Required" status code into an active payment protocol.

The flow:

  1. An agent calls an API endpoint (any URL)
  2. The server responds with HTTP 402 Payment Required plus a payment challenge (amount in USDC, recipient address, chain)
  3. The agent's wallet sends the USDC payment
  4. The agent retries the request with the payment receipt as a header
  5. The server validates the payment and returns the data

No account creation, no API key, no subscription. The agent just pays for what it uses, atomically.


Why x402 matters

x402 is the closest thing to "machine-money" on the public web. An AI agent with a wallet can autonomously discover and pay for APIs without any human intervention — no manual signup, no card, no key escrow.

The 2026 agent-payments stack typically includes several complementary standards:

  • x402 (Coinbase) — synchronous HTTP pay-per-request with USDC
  • MPP (Tempo) — multi-chain multi-token routing for payment flexibility
  • ACP (Virtuals) — agent-to-agent commerce: agents paying agents for services
  • UCP, TAP, L402 — adjacent payment-rail standards
  • MCP — the protocol agents speak to discover what's available

Current crypto-data examples include CoinGecko's experimental x402 endpoints, Alchemy's x402 wallet-authenticated agent gateway, and CoinMarketCap's x402 MCP endpoint. Hive's current pricing is credit-based; x402 / MPP support is on the evaluation list.

Primary references: