What is x402, the pay-per-use web for AI agents?
Coinbase and Cloudflare are switching on a dormant HTTP code so AI agents can pay per request in stablecoins. What x402 is, and its catch.
On this page
For thirty years, one number in the web’s plumbing has sat switched off. HTTP, the language browsers and servers speak, has a status code called 402 Payment Required, reserved by its own authors and almost never used, because the internet was never built to move money. That is the code Coinbase and Cloudflare are now switching on.
What is x402, in one sentence?
x402 is an open way to pay for something over the web the instant you ask for it, named after that dormant 402 code. You request a page, a dataset or an API; the server answers “that costs one cent”; your software pays in a stablecoin, a digital coin worth one dollar, and the content arrives. No account, no subscription, no card on file. The whole exchange takes about two seconds.
The twist is who it is really for. x402 was designed less for people clicking buttons than for software acting on its own: the AI agents that now browse, book and buy on our behalf. An agent can pay a fraction of a cent for a single search, and do it thousands of times an hour, without a human touching a wallet.
Why did the web never have a “pay” button?
Because small payments were never worth it. Sending a few cents through the card networks can cost more than the few cents themselves, so the web paid for itself with advertising and subscriptions instead. The 402 code was left in the standard as a placeholder for a future that did not arrive.
Stablecoins change that arithmetic. A coin that lives on a public network, the shared ledger these coins run on, can move a hundredth of a cent in under a second for a negligible fee. That makes charging per request, per token or per result finally practical, which is the opening x402 is built to fill.
What did Cloudflare just announce?
On July 1, 2026, Cloudflare opened the waitlist for a Monetization Gateway: a way for any site it protects to charge for its pages, datasets, APIs or agent tools without building a billing system. A buyer that will not pay gets the 402 answer and a price; one that pays gets the content, and the money lands straight in the seller’s own wallet. Cloudflare checks the payment at the edge, on its own network, before the request ever reaches the site.
The examples it gives are telling: a few cents per web search, a tenth of a cent plus a cent per megabyte to accept an upload, or ninety-nine cents for a support ticket that actually gets resolved, paid only when the work succeeds. As Cloudflare put it, “the natural unit of payment for software is the request, the token, or the outcome, not the seat or the month.” Payments settle in stablecoins, including Open USD and USDC, in under a second.
Who is actually using this?
Real volume, but read it carefully. Coinbase open-sourced x402 in May 2025, and by April 2026 it had become a project under the Linux Foundation with 22 launch members that read like a payments who’s-who: Visa, Mastercard, American Express, Stripe, Google, Shopify and Circle among them. On Base, Coinbase’s network, x402 went from near-zero in mid-2025 to more than 100 million payments by early 2026, according to Chainalysis.
Here is the honest part. Chainalysis found that much of that early spike was meme-coin speculation, not agents buying useful things, and the typical x402 wallet looks less like a business than a crypto trader: newer than an average user, holding far more tokens, moving far more money. The rail works. The everyday, boring commerce it was pitched for is mostly still ahead of it.
How open is an “open” standard?
This is the sharpest doubt. In practice, x402 today runs mostly on one coin (USDC), one chain (Base) and one settlement middleman, called a facilitator, that verifies and clears each payment, which for now is largely Coinbase. Security researchers point out that a standard funneling through a single company’s infrastructure sits awkwardly with the word “open,” whatever the member roster says. A foundation with 22 famous names is a promise; a protocol that anyone can settle on, without one gatekeeper, is the thing that has to be proven.
What are the risks nobody puts on the slide?
- Privacy. Each payment carries small free-text fields, a link, a description, a reason, that pass through the facilitator. The pipe was built for settlement, not for privacy, and researchers warn those fields can leak personal data.
- Security. A 2026 academic paper catalogued five distinct attacks on x402, in how it authorizes payments and guards against replays. New money plumbing tends to get probed hard, and this did.
- Speculation. The name attracted a wave of x402-branded tokens that pumped and dumped. That froth is not the protocol, but it rode the same hype, and it is easy to confuse the two.
Why it matters
Strip away the tokens and x402 is a genuine attempt to give the web something it never had: a built-in way to charge for a single thing, once, the moment it is used. If software becomes the main buyer online, then, in Cloudflare’s words, “the request becomes the transaction,” and that is a real shift in how the internet could pay for itself, worth watching without buying the hype.
The same rail underneath it, instant, sub-second, near-zero-fee stablecoin settlement, is not reserved for machines. It is what already lets a group of friends settle a shared tab in seconds, across borders, with their money staying in their own wallets, on Spliz: free to track, 0.1% only when the group settles. An agent paying a cent for a search and a table of six squaring up after dinner are the same plumbing, pointed at two very different users.
The one-line version
x402 finally turns on the web’s dormant “pay” code so machines can pay per request in stablecoins. The technology works; whether an “open” standard that runs on one coin, one chain and one middleman is open in more than name is the part still being decided.
The web waited thirty years for a way to charge a penny. The machines asked for it first.
Sources
- Cloudflare, the Monetization Gateway announcement, pricing examples and quotes (July 1, 2026).
- Cloudflare, launching the x402 Foundation with Coinbase and how the flow works (September 2025).
- Coinbase, the original x402 introduction and specification (May 2025).
- The Block, a neutral explainer of the protocol and its settlement flow.
- Chainalysis, the adoption figures and the meme-coin speculation caveat.
- arXiv, “Five Attacks on x402,” the protocol’s security weaknesses.
- Halborn, security risks and the centralization critique.
The shared account for your friends. Settle your next group tab in one signature.