x402
Open standard for internet-native payments built on HTTP 402, letting APIs and agents pay per request across crypto and fiat networks.
Tags
Description
Server middleware declares prices per route; clients pay and retry inside the HTTP request flow, with no accounts or checkout pages. Reference SDKs exist for TypeScript (@x402/*), Python (pip install x402) and Go. The canonical repo is x402-foundation/x402 (coinbase/x402 is now a fork).
Agent access
Related
- Coinbase CDP x402 Facilitator: Coinbase Developer Platform's x402 offering: a hosted facilitator that verifies and settles x402 payments, plus seller and buyer SDK quickstarts.
- Machine Payments Protocol (MPP): Open standard for machine-to-machine payments over HTTP 402, co-developed by Tempo and Stripe; charge per API request, tool call or content.
- L402 (Lightning HTTP 402): Lightning Labs standard for paying for and authenticating to APIs with Bitcoin Lightning payments; Aperture is the reference reverse proxy.
- Coinbase Agentic Wallet: Wallet tooling that lets AI agents hold, spend, trade and earn stablecoins with guardrails, via the awal CLI + skills or an MCP server.
Guides & comparisons
- Pay for an API as an agent with x402 (Guide): How an agent pays per request for an HTTP API or MCP tool with x402 v2, from reading the 402 response to signing a USDC payment with spend caps, on testnet first.
- Agent payment protocols compared (Comparison): x402, MPP, L402, ACP, AP2 and UCP compared on what each standardizes, payment rails, wire format, governance, spec status and SDKs, so you can tell machine-payment protocols from agent-checkout protocols.
- Agent that can buy things (Stack): The pieces for an agent that pays for APIs per call with x402 stablecoins and buys from merchants with controlled virtual cards, with spend limits, proof of user intent and a full audit trail.
- Pay with x402 (Skill): Read an x402 v2 402 response, check it against a spending policy, pay with an SDK or CLI, and verify the PAYMENT-RESPONSE receipt.
Sources
Machine-readable
- JSON
- Markdown
- Source file on GitHub (edit via pull request)