Guide · Plain English · 2026
What is x402?
x402 is a simple idea: a website or API can charge a small payment before it gives you the data.
That is it.
The problem it solves
Most paid APIs force you into accounts, API keys, monthly plans, or checkout pages. That works for humans. It is awkward for software, especially AI agents that may only need one cheap request.
x402 uses an old HTTP status code, 402 Payment Required, to handle that in a normal web request.
How it works
- You ask for something (an API call).
- The server replies: “This costs money,” and includes the price and where to pay.
- You pay from a crypto wallet (often a stablecoin like USDC).
- You ask again, this time with proof of payment.
- The server unlocks the response.
Think of it like a vending machine on the internet. Request, pay, receive.
Why it matters now
Three things finally lined up:
- Stablecoins that stay near one dollar
- Blockchains fast and cheap enough for tiny payments
- Software agents that can pay without a human clicking “Buy” every time
Coinbase launched x402 in 2025. Governance later moved to an open group, the x402 Foundation under the Linux Foundation, so it is not only a single-company product.
What x402 is not
- Not a credit card processor
- Not a replacement for every subscription
- Not free (you still pay small network fees)
- Not only for crypto experts
Who it is for
- Developers who want pay-per-request pricing
- People building tools AI agents can use
- Anyone tired of billing systems for one-cent calls
Try it here
Start with the interactive lessons, practice a wallet on Devnet, then ship middleware when you are ready.