← Payment Reference GuidesInternet-Native Payments

The x402 Payment Protocol

How HTTP 402 Payment Required became a real payment rail: the request/quote/sign/settle handshake, the EIP-3009 stablecoin authorization underneath it, the facilitator model, and what it means for payment engineers coming from card rails.

What is x402?

x402 is an open protocol that turns the HTTP status code 402 Payment Required — reserved since the 1990s but never standardized — into a working payment mechanism. A server answers an unpaid request with a 402 and machine-readable payment requirements; the client signs a stablecoin transfer authorization and retries the same request with the signature attached as a header; the server (usually via a third-party facilitator) verifies and settles the transfer on-chain and returns the resource. No accounts, no API keys, no checkout redirect — the payment lives entirely inside one HTTP retry loop.

The protocol was launched by Coinbase in May 2025 and is now stewarded by the x402 Foundation (Coinbase and Cloudflare among the founding members). Protocol v2, published in December 2025, standardized CAIP-2 network identifiers and renamed the headers. It is aimed squarely at machine-to-machine commerce: AI agents paying APIs per call, metered compute, micro-paywalls, and pay-per-crawl content licensing.

Stateless

No accounts or sessions

Payment is per-request. The "identity" is a wallet signature, so any HTTP client — human, script, or agent — can pay without registering anywhere.

Gasless for the payer

Sign, don't broadcast

Clients sign an EIP-3009 TransferWithAuthorization — an off-chain message. The facilitator or server broadcasts it and pays gas, which is what makes sub-cent payments economical.

Seconds, not T+1

Settlement is the payment

There is no separate authorization/clearing/settlement pipeline — the on-chain transfer is all three, final in seconds on an L2 like Base.

Try it hands-on: step through the full handshake in the x402 Flow Simulator, and decode real protocol headers in the x402 Header Decoder.

The three roles

RoleCard-world analogueWhat it does
ClientCardholder + terminalRequests resources, holds a wallet, signs payment authorizations. Often an AI agent.
Resource serverMerchantPrices its endpoints, answers 402 with requirements, delivers once payment verifies.
FacilitatorAcquirer / processorVerifies signatures and balances, broadcasts the transfer on-chain, pays gas. Optional — servers can self-verify.