An API can use the HTTP 402 Payment Required response to tell an application what a request costs and how to pay. Coinbase introduced x402, the open protocol that defines this exchange, in May 2025. USDC is a commonly used payment asset, but the protocol does not require a particular stablecoin or payment method.
From price quote to settlement
- An application or AI agent requests a resource from a server.
- The server responds with
402 Payment Required. ItsPAYMENT-REQUIREDheader specifies the payment model, amount, accepted asset, blockchain network and recipient. - The application checks the terms against its budget and permissions. If the terms fit, a protected wallet signer signs the payment authorization.
- The application repeats its request, this time carrying the authorization in the
PAYMENT-SIGNATUREheader. - The server verifies the authorization, optionally using a facilitator. The signature is not itself confirmation of settlement: the server grants access once settlement is confirmed.
Paying for a single request
An AI agent troubleshooting a bug could use x402 to pay for a single query to a remote testing service. A human operator would not have to create an account, arrange a subscription or fund a prepaid balance for that query. For developers using multiple providers, the common HTTP format reduces the need for separate billing integrations. Providers can use it to charge small amounts for API calls, data or digital content.
Since its introduction by Coinbase, the open-source protocol has been adopted by the x402 Foundation, which operates under the Linux Foundation. Participants include AWS, Circle, Cloudflare and the Solana Foundation.


