Agentic Commerce
What is x402? The HTTP-Native Payment Protocol for AI Agents
x402 is an HTTP-native protocol that revives the 402 Payment Required status code for AI agent payments, now governed by the Linux Foundation.
Last updated:
x402 is an open protocol that revives the HTTP 402 Payment Required status code (defined but unused since 1997) to enable machine-to-machine payments between AI agents and APIs. It was originally proposed by Coinbase in 2024 and donated to the Linux Foundation in early 2026 as a neutral project.
The flow works as follows: a client (e.g., an LLM agent) calls an API. The server replies with HTTP 402 and a header describing price, chain, and payment method (typically a stablecoin such as USDC on Base or Solana). The agent pays on-chain and retries the request with a proof-of-payment header, receiving the resource.
x402 competes with proposals like UnionPay's APOP and Google's AP2. Its key advantage is simplicity: no pre-existing accounts, no OAuth tokens, no monthly billing. This makes it especially suited to microtransactions and on-demand API calls issued by autonomous agents.
Since entering the Linux Foundation, x402 has added support from Cloudflare, Stripe (via Stripe Connect), and several Web3 infrastructure providers. It is a core building block of the emerging agentic commerce ecosystem.
Key facts
- •Revives the HTTP 402 Payment Required status code (RFC 7231)
- •Originally proposed by Coinbase in 2024
- •Donated to the Linux Foundation in 2026
- •Supports stablecoins (USDC) on Base, Solana, and other chains
- •Designed for machine-to-machine AI agent payments
- •No pre-existing accounts or OAuth required
- •Supported by Cloudflare, Stripe, and Web3 providers