Put a coin in a vending machine, out comes a drink. x402 recreates that exact simple exchange on the web.
Standing at a vending machine is beautifully simple. You drop in a coin, a drink comes out. No sign-up, no ID, no card approval. Just the coin and the drink — that one exchange.
That’s exactly what x402 does. It turns a website into a vending machine.
When an AI asks a service “give me this data,” the server replies “that’ll be 0.3 cents,” the AI drops in a digital coin (USDC) on the spot, and the data comes out. No account, no card number, no human click.
Here’s a fun fact: the signal for this was built into the web from the very beginning.
Back in the 1990s, the web’s designers created a set of “response signals.” The famous “404 – Page Not Found” is one of them. And alongside it, they also created “402 – Payment Required.”
The problem was, there was no way to actually use it back then. The internet had no way to pass a few cents back and forth. So this “402” traffic light sat switched off for over 30 years.
x402 is what finally turned that old light on. That’s where the name comes from.
Put the process of an AI buying paid data into plain words, and it goes like this:
The whole thing wraps up in a couple of seconds, no human involved — just like dropping a coin and grabbing a drink from a machine.
x402’s biggest appeal is its simplicity.
If you’re the one selling a service, you don’t have to bolt on some complex payment system. Add a few lines to your web service and you can start taking money from AI right away. No membership management, no approval flow, no middleman.
So the approach caught on fast. Coinbase created it, then internet-infrastructure company Cloudflare and payments company Stripe joined in. Even Amazon (AWS) picked x402 first when adding payment features to its AI service.
Nothing’s perfect, of course. x402 has limits.
Think of this less as a flaw and more as a clue — it hints at why the other approaches we’ll cover next even exist.
x402 = tech that turns a web page into a vending machine. The AI drops in a coin (stablecoin) and the service comes right out.
Next time we look at AP2 and MPP. One works like “an allowance limit your parent set in advance,” the other like “running a tab at a bar and settling up all at once later.”
This is Part 2 of ChainLab’s series, “Agent Payments, Explained Simply.”
Data on Chain — Part 3 of 3 · ChainLab The first two parts were…
Data on Chain — Part 2 of 3 · ChainLab In Part 1 we settled…
Data on Chain — Part 1 of 3 · ChainLab Here is a tempting idea.…
Korea's tech is world-class, so why isn't AI payment running smoothly here yet? The answer…
You've probably used "safe payment" on a secondhand marketplace. AI payments need this too. The…
If last part's x402 was a vending machine, these two approaches are closer to a…