What Is x402? HTTP Payments for AI Agents

x402 is an open payment standard that lets software pay for something on the web in the same breath as asking for it. It reuses a status code that has sat unused for decades - 402, "Payment Required" - as a price tag. A program asks a server for some data, the server answers "that costs a fraction of a cent", the program pays in stablecoins, and the data comes back. Coinbase wrote the standard and gave it away as open code.
Why does an AI agent need its own way to pay?
Card payments were built around a person: a name, a billing address, a form to fill in, and a charge big enough to be worth the processing fee. None of that suits a program that wants to buy one weather lookup for a tenth of a cent, two hundred times an hour. It is the vending machine problem - the machine only takes notes, and all you want is a single sweet. A stablecoin payment on a cheap network can be that small coin, because sending a tenth of a cent costs about a tenth of a cent.
What actually happens when a program pays?
Four steps, all inside one ordinary web request:
- The program asks the server for the thing it wants.
- The server replies 402 and lists its terms: the price, which blockchain it accepts, and the address to pay.
- The program signs a payment matching one of those terms and asks again, carrying the signature with it.
- The server checks the payment, settles it onchain, and returns the data.
No account, no sign-up, no card on file. The wallet still decides what it is willing to sign, so x402 sets the price and the plumbing - not the spending limits.
Is anyone really using it?
It is early but real. Cloudflare has been testing a pay-per-crawl option so site owners can charge AI crawlers instead of blocking them, and payment services that handle the settlement are live on several networks, Solana among them. In April 2026 the Linux Foundation took over stewardship of the standard through an x402 Foundation, launched with 22 supporting organisations.
Nothing starts paying on its own: these are real transfers from a real wallet that somebody funded. If you ever give an agent one, give it its own - a fresh MetaMask account with pocket money in it, never the account holding your savings. For the mechanics, read how agents pay onchain, and for the story of the status code itself, HTTP 402 payments explained.