
For decades, HTTP status code 402 — “Payment Required” — sat dormant, reserved but unused. Today, it’s being revived by Coinbase’s x402 initiative: a specification to make the web natively payment-aware, powered by crypto and stablecoins.
x402 bridges the worlds of web APIs and digital money. It proposes that instead of manually implementing payment flows with separate SDKs or redirecting users to off-site checkout pages, payment negotiation and fulfillment could happen directly at the HTTP layer — just like authentication or caching.
In other words, x402 aims to make “payment” a first-class citizen of the internet protocol stack.
How x402 works
At its core, x402 standardizes how a client, a server, and optionally a facilitator interact when a resource requires payment.
The Three Participants
- Server: Owns premium data or content and defines the payment requirements (e.g. amount, asset, chain).
- Client: Requests access to the resource, equipped with a wallet capable of signing transactions.
- Facilitator: A piece of middleware or infrastructure that abstracts verification, settlement, and on‑chain interactions.
Payment Flow
- The Client requests a protected endpoint, e.g.
/premiumdata. - The Server replies with a 402 Payment Required response, detailing the payment requirements (such as 100 USDC on Base).
- The Client signs a transaction using the ERC‑3009 “transferWithAuthorization” function — essentially approving the server (or facilitator) to withdraw the designated funds.
- The Server or Facilitator verifies the signature and terms, checking that the payment satisfies the stated conditions.
- The Facilitator performs the on‑chain settlement, handling the gas, nonce, and key management behind the scenes.
- Once the server receives confirmation, it responds with a 200 OK — delivering the requested premium content or data.
The facilitator plays a similar role to a payment processor like Stripe, except decentralized, network‑agnostic, and compatible with both crypto and (eventually) fiat rails.

Why x402 matters
Today, web payments are trapped inside siloed SDKs, checkout pages, and API keys owned by proprietary providers. For machine‑to‑machine use cases — such as AI agents, APIs, or decentralized applications — that model doesn’t scale.
x402 shifts payments from an application concern to a protocol concern.
By defining how payments can be negotiated, verified, and fulfilled directly at the HTTP (or transport‑agnostic) layer, x402 unlocks:
- Native web interoperability. Clients and servers speak a shared payment language.
- Protocol‑level programmability. Any API or service can require payment as part of the request lifecycle.
- Multi‑network support. Crypto, fiat, or hybrid rails coexist through standardized schemas.
This makes pay‑per‑use, micro‑transactions, or pay‑gated APIs possible without relying on centralized intermediaries.
x402 v1: The foundation
Version 1 of the specification focused on proving that machine‑readable payment negotiation could work. The key ideas included:
- HTTP Status 402 as the entry point: Servers responded with a structured
PaymentRequirementsobject when access required payment. - Facilitators as neutral executors: Responsible for verifying client signatures, ensuring validity, and (optionally) executing the transaction.
- Transport independence: While rooted in HTTP, the spec was designed to work across WebSocket, WebTransport, or other message-based transports.
- Crypto‑first, chain‑agnostic logic: Supporting CAIP‑formatted network identifiers (
eip155:1for Ethereum mainnet, etc.) for on‑chain payments.
v1 laid the groundwork for interoperable pay‑to‑access flows, but as adoption grew, new edge cases emerged — from fiat compatibility to stateless authentication.
What’s coming in x402 v2
The upcoming v2 marks a major evolution. Based on discussions in the draft changelog, v2 refactors the SDK and updates the spec to be both more extensible and backward‑compatible with v1.
Key changes and refactors
-
Signed Identifier:
A stateless mechanism for clients to authenticate requests after payment.
Instead of long‑lived sessions, the client signs a short‑lived JWT‑like token (e.g. usingeip712orsiws) proving wallet ownership. The server validates this signature to confirm that the requester previously paid and still owns the wallet. -
Receipts and Replay Protection:
A new concept — PaymentReceipt — allows servers to issue signed tokens after completed payments. Clients can re‑use these receipts for subsequent authorized access, verified alongside their signed identifier.
This preserves statelessness while preventing replay attacks. -
Expanded Network Models:
Beyond blockchain networks (eip155,solana), v2 allows support for theoretical non‑blockchain networks likecloudflareorach. This opens the door for fiat or hybrid payment facilitators while keeping crypto‑style composability. -
Flexible Schema Definitions:
Standardized parameter schemas clarifyinputandoutputformats for different transports, improving SDK discovery and integration. -
External Identifiers:
A newexternalIdfield associatesPaymentRequirementsandPaymentPayloads, enabling servers to link off‑chain records or third‑party payment metadata. -
Transport‑agnostic “Middleware per Route” configuration:
Merchants can specify different facilitators and payment parameters per API route — improving redundancy and enabling multi‑chain monetization.
V2 is not just a technical cleanup — it’s a step toward a neutral internet‑payments standard capable of spanning crypto, fiat, and machine‑native economy use cases.
The bigger picture
If successful, x402 could do for payments what HTTP did for documents — a universal layer that anyone can build on. Imagine APIs, AI agents, or cloud endpoints that can natively charge for usage, without embedding third‑party processors.
The v2 overhaul reflects the maturation of this idea: from a crypto‑centric prototype to a transport‑agnostic, receipt‑driven framework for programmable value exchange.
It’s still early, and much of the discussion is happening openly among contributors from Coinbase, Vercel, and independent Web3 developers. But the direction is clear: x402 aims to make “Payment Required” a real message again — one every connected machine can understand.