An independent guide to the x402 protocol

The web finally has a way to charge by the request.

x402 turns the long-dormant HTTP 402 status code into a working payment rail — letting APIs, AI agents, and software pay each other in stablecoins, instantly, with no accounts or invoices. Here's what it actually does, and how to use it.

> GET /api/forecast/hourly
 
402 Payment Required
price: $0.004 USDC
network: base
pay-to: 0x4f2...e91a
 
> GET /api/forecast/hourly
X-PAYMENT: eyJzY2hlbWUiOi...
 
200 OK
{ "temp": 14.2, "conditions": "overcast" }

How x402 actually works

Four steps, no account required, settled on-chain in seconds.
STEP 01

Request

A client — a browser, an app, or an AI agent — requests a resource over normal HTTP. Nothing unusual yet.

STEP 02

402 response

If the resource is paid, the server replies with status 402 and the exact terms: price, accepted token, network, and where to send it.

STEP 03

Signed payment

The client signs a stablecoin payment (usually USDC) and retries the same request with the payment attached in a header.

STEP 04

Settlement & delivery

A facilitator verifies the payment on-chain. Once confirmed, the server returns 200 OK with the resource. The whole loop takes seconds.

WHY IT MATTERS

No accounts, no minimums

There's no signup, no card minimum, no subscription. A request costing a fraction of a cent is now economically possible — which it never was under card networks.

WHO BUILT IT

Open, not proprietary

Coinbase shipped the original spec; it's now stewarded by the x402 Foundation alongside Cloudflare, with Google, Visa, Stripe, and AWS among the members. No single company controls it.

Choosing a facilitator

A facilitator verifies and settles the on-chain side of a payment so you don't have to run blockchain infrastructure yourself. Here's how the main options differ.
Facilitator Networks Free tier Best for
Coinbase CDP Base, Polygon, Arbitrum, World, Solana 1,000 tx/mo, then $0.001/tx Most reference implementations; best documentation
Cloudflare Base (native Workers support) Included with Workers plans Teams already running on Cloudflare infrastructure
Solana-native facilitators Solana Varies by provider Sub-second finality, very high transaction volume

This table reflects the publicly documented state of each provider and changes as the protocol evolves. Always confirm current pricing and network support directly with the provider before integrating.

Guides

Plain explanations, written for people deciding whether and how to use x402 — not for protocol engineers.
Explainer What is x402? The HTTP status code that finally does something 7 min read
Comparison x402 vs. Stripe's Agent Commerce Protocol: what's the actual difference? 6 min read
Guide Should your API accept x402 payments? A practical checklist 8 min read
Reference x402 terms explained: facilitator, resource server, scheme, and more 5 min read
Guide How to actually pay an x402 request: a setup guide 9 min read
Safety Is x402 safe? How to spot scams trading on its name 6 min read

New guides, sent occasionally

No spam, no daily digest — just a note when we add something genuinely new to the site.

This form isn't connected yet — wire it to an email provider (e.g. Mailchimp, ConvertKit, Cloudflare Pages Functions) before going live.