x402 Protocol
The x402 protocol is an open standard developed by Coinbase in collaboration with Cloudflare and other infrastructure providers to enable autonomous payments over the web. It revives the long-dormant HTTP 402 "Payment Required" status code, first defined in the 1990s but never implemented at scale.
How It Works
Request-Response Flow: When an AI agent requests a service, the server responds with HTTP 402 Payment Required, including payment details (amount, recipient wallet, payment token). The agent cryptographically signs a payment authorization using ERC-3009 TransferWithAuthorization and submits it via HTTP header. The server validates the signature, executes the on-chain transfer, and grants access.
Technical Architecture: Uses EIP-712 signature standard for structured data signing, enabling gasless USDC transfers on Base (Coinbase's Layer 2) with ~2-second settlement and fees under $0.0001. The protocol embeds cryptocurrency rails directly into HTTP's native protocol stack, making payments as seamless as data transfer.
Agent-to-Agent Commerce: Unlike traditional payment APIs requiring human approval loops, x402 enables machines to transact autonomously - paying for compute, data access, API calls, or digital services without human intervention.
Implications
Infrastructure Control: While technically open, x402 concentrates payment flow through Base blockchain (Coinbase controls sequencer), USDC settlement (Circle controls reserves), and cloud infrastructure (dominated by Google, AWS, Cloudflare).
Programmable Finance: x402 transforms AI agents from recommendation engines into economic actors capable of independent financial decisions - creating new questions about liability, authorization, and control.
Related Concepts
- Agent Payments Protocol (AP2): Google's framework for AI-to-AI transactions
- USDC: Primary settlement token for x402 transactions
- Autonomous Agents: AI systems with decision-making authority
- Machine Commerce: Economic activity between AI systems
Related Terms
Found this definition useful? Share it.