Agent Payment Protocol (x402)
x402 is an open standard protocol that enables AI agents to make payments over HTTP using the 402 "Payment Required" status code. It represents a fundamental building block for the "agentic economy."
Overview
| Attribute |
Value |
| Name |
x402 (pronounced "x-four-oh-two") |
| Basis |
HTTP 402 "Payment Required" status code |
| Type |
Open standard protocol |
| Primary Use |
Machine-to-machine payments |
| Currency |
Stablecoins (USDC, PYUSD, USDT) |
How It Works
Basic Flow
1. Agent A requests service from Agent B
↓
2. Agent B responds: HTTP 402 Payment Required
(includes payment details: amount, currency, address)
↓
3. Agent A submits payment via blockchain
↓
4. Agent B verifies payment
↓
5. Agent B provides service
Key Features
| Feature |
Description |
| Pay-per-call |
Micropayments for individual API calls |
| End-to-end auditability |
All transactions on-chain |
| Stablecoin-native |
No volatile cryptocurrency exposure |
| HTTP-native |
Works with existing web infrastructure |
Implementations
Kite.ai
- Native x402 compatibility as core feature
- Integrated with Coinbase's x402 standard
- Part of six-pillar mainnet roadmap
Coinbase
- 50 million+ machine-to-machine transactions processed
- Integrated with Coinbase AgentKit
- Supports Base network (L2)
Google AP2 Partnership
- Kite AI entered AP2 (Agent Payment Protocol) community partnership with Google (Feb 2026)
- Signals big tech interest in agent payments
Relationship to Other Protocols
| Protocol |
Relationship |
| MPP (Machine Payments Protocol) |
Stripe/Tempo's alternative — similar goals, different implementation |
| AP2 |
Google's Agent Payment Protocol — x402 is one implementation |
| Traditional HTTP |
x402 extends HTTP with payment semantics |
Use Cases
API Access
- AI agents paying for search APIs
- Data providers charging per query
- Compute resources paid by the minute
Agent-to-Agent Commerce
- One agent hiring another for specialized tasks
- Subcontracting in agent swarms
- Reputation-weighted pricing
Content Access
- Pay-per-article for AI training data
- Image/video generation credits
- Real-time data feeds
Market Context
Why It Matters
The shift from "attention economy" (ads) to "intent economy" (direct payments):
| Era |
Model |
Who Pays |
| Web 2.0 |
Ad-supported |
Advertisers → Platforms |
| Agentic |
Pay-per-use |
Agents → Service Providers |
Adoption Metrics
- $5 trillion: McKinsey prediction for Agent Commerce by 2030
- <1%: Current consumer adoption of agent purchasing
- 50M+: x402 transactions processed (early 2026)
Technical Details
Payment Flow
- Request: Agent makes HTTP request
- 402 Response: Server responds with payment requirements
- Payment: Agent submits blockchain transaction
- Verification: Server confirms payment on-chain
- Service Delivery: Server provides requested resource
Security Considerations
- Replay attack prevention
- Payment verification latency
- Refund mechanisms
- Dispute resolution
Challenges
| Challenge |
Status |
| Wallet management |
Solved by MPC wallets (AgentKit, Privy) |
| Price volatility |
Solved by stablecoins |
| Transaction speed |
Improving with L2s (Base, Tempo) |
| User experience |
Still complex for non-technical users |
| Regulatory clarity |
Uncertain in many jurisdictions |
Related