x402 · HTTP 402 Payment Required
Native HTTP payments for APIs and AI agents.
x402 revives the dormant HTTP 402 status code as a programmable payment handshake. APIs respond with 402 + payment requirements; clients (humans or AI agents) settle on-chain in stablecoins and retry the request. No accounts, no API keys, no card processors. Settlement on Base mainnet in under 200ms.
The four things x402 actually delivers.
- Reuses HTTP 402 as a programmable payment status code.
- Embeds payment requirements directly in the HTTP response.
- Settles in stablecoins (USDC) on EVM chains in <200ms.
- No accounts, no API keys, no card processors — pure HTTP + crypto.
The flow, end to end.
Agent calls API
Standard HTTP request to a paid endpoint.
Server returns 402
Response carries price, network, payee, asset (USDC).
Agent signs & pays
EIP-3009 transferWithAuthorization signed by the wallet.
Facilitator settles
On-chain transfer verified by an x402 facilitator.
API replays the call
Original request returns the data with proof-of-payment.
A vending machine. You press B4 for chips. The screen shows $1.00. You insert a dollar. Chips drop immediately. That is x402: instant pay, instant access — at the protocol layer of the web.
Run an x402 facilitator without infra work
xpay operates an open, zero-fee facilitator at facilitator.xpay.sh on Base mainnet + Sepolia. Plug it into your API or your agent and inherit settlement, retries, and audit logs.
See xpay Facilitator →What x402 ships, what it does not, and what bridges the gap.
Instant micropayments, open spec, multi-chain.
No native spending controls, no audit trail, no per-agent governance.
Policy enforcement before payment executes — budget caps, category checks, recipient allowlists, signed receipts.
Spending guardrails for x402 agents
Smart Proxy sits between an agent and any x402 endpoint. It enforces per-agent budgets, daily caps, and merchant allowlists before the 402 settlement fires.
Smart Proxy →x402 compared.
x402 vs MPP
x402 is HTTP-native and stablecoin-settled today. MPP is Stripe + Tempo's card-rail counterpart aimed at machine-to-machine card payments. They are complementary rails, not substitutes.
x402 vs ACP
x402 settles per-call API payments. ACP settles consumer checkout in conversational surfaces (ChatGPT). x402 is API-side, ACP is checkout-side.
x402 vs AP2
AP2 is the governance spec for agent payments. x402 is a settlement rail. AP2 implementations frequently use x402 as the stablecoin rail.

