What is x402? HTTP 402 Payment Required, Explained
x402 is the open protocol that gives HTTP's long-dormant 402 Payment Required status code a real, machine-readable meaning: pay per request, no account required, verified and settled by a facilitator.
The x402 flow, step by step
- A client calls a metered endpoint with no payment attached.
- The server responds 402 Payment Required with a PAYMENT-REQUIRED header describing amount, asset, network, and recipient.
- The client signs a payment authorization for that exact amount with its wallet.
- The client retries the same request with the signed payment attached.
- The server hands the payment to a facilitator, which verifies and settles it on-chain.
- The server returns 200 OK with the resource and a PAYMENT-RESPONSE receipt header.
Frequently asked questions
What is x402? An open protocol built on HTTP 402 for per-request, account-less payments.
What does HTTP 402 Payment Required mean? A status code x402 gives concrete meaning: pay this exact amount to this recipient to get this resource.
How is x402 different from an API key or subscription? It is per-request and account-less — no signup step required.
What is a facilitator in x402? The service that verifies and settles a signed payment authorization on-chain.
Can an AI agent use x402? Yes — agents can discover the price, sign a payment, and retry autonomously.
Does this service use OAuth or OpenID Connect? No. The auth and payment protocol here is x402 (HTTP 402 Payment Required), not OAuth 2.0 or OpenID Connect. There are no OAuth/OIDC endpoints; requests for OAuth/OIDC discovery documents (for example /.well-known/openid-configuration) return an application/problem+json error that points to the canonical x402 discovery surfaces (/.well-known/api-catalog and /.well-known/ucp).