x402
x402 is an open payment protocol that revives the HTTP 402 status code so an agent can pay per request over HTTP without accounts or manual payment flows.
Description
x402 is an open payment protocol from Coinbase that uses the HTTP 402 Payment Required status code to settle stablecoin payments directly over HTTP. When a resource requires payment, the server returns 402 with payment instructions, and the buyer retries the request carrying a signed payment. It targets both human developers and AI agents that need to access paid services without accounts or manual payment flows. The protocol is an open standard not tied to a single provider, and supports stablecoin payments such as USDC across several chains.
Solution
An agent (or any HTTP client) requests a paid resource and receives a 402 Payment Required response carrying payment instructions in a header. The agent constructs and sends a signed payment payload, then retries the request; once the payment is verified, the server returns the resource. This lets the agent settle a payment mid-request and continue, with no per-transaction human checkout.
Primary use cases
- agent payments per HTTP request
- monetizing APIs and digital content with pay-as-you-go billing
- autonomous service access without accounts or manual checkout
- stablecoin micropayments over HTTP
Open the full interactive page →
Diagram, neighbourhood map, code examples, related patterns and full provenance.