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
- Give an agent a Lightning wallet with Nostr Wallet Connect (Guide): How to let an agent pay Lightning invoices and check its balance through Nostr Wallet Connect (NIP-47), using a budget-capped connection from Alby Hub or LNbits, the Alby JS SDK or the Alby MCP server.
- 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.
- Payment processor MCP servers compared (Comparison): The official MCP servers from Stripe, Square, PayPal, Razorpay and Adyen compared on hosting, authentication, what they cover, licence and maturity, so you can wire an agent to the processor you already use.
- 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.
- Discover a site's agent interfaces (Skill): A probe-then-pick workflow for finding the best machine interface a website offers (MCP, A2A, OpenAPI, Agent Skills, llms.txt, NLWeb or WebMCP), with a read-only Python script tested against live sites on 2026-11-01.
- 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)