TL;DR: x402 is an open standard that lets software, including AI agents, pay for APIs, data, and services directly over HTTP using stablecoins, with no accounts, API keys, or human checkout. It puts the web's unused 402 Payment Required status code to work as a native payment layer.
The web reserved a status code for payments in 1996 and then left it empty for thirty years. AI agents just gave it a job.
Every developer has met 404 Not Found. Most have fought 403 Forbidden. But sitting quietly between them in the HTTP spec is 402 Payment Required, marked "reserved for future use" since the earliest versions of the protocol. The people who designed the web assumed money would eventually move through it natively. Then credit cards, checkout forms, and subscriptions happened, and that future got postponed indefinitely.
So what changed? Software started buying things for itself.
The problem x402 was built to solve
An AI agent can read documentation, call APIs, and chain together tools without a human in the loop. What it cannot do is pull out a credit card.
Every payment system we built for the web assumes a person is present. Someone to fill the checkout form, pass the KYC check, approve the charge, and manage the subscription. That works fine when a human buys one thing. It collapses when an agent needs to make two hundred small purchases an hour, each worth a fraction of a cent, from services it has never seen before.
The old workaround was API keys and prepaid accounts. But that means a human signing up for every service in advance, which defeats the point of an autonomous agent. If your agent discovers a useful data API at 3 a.m., it should be able to pay for one call and move on, not wait for you to wake up and register an account.
x402 is the standard built for exactly that gap, and it lives entirely inside HTTP.
What x402 actually is
x402 is an open payment standard launched by Coinbase in May 2025. It uses the HTTP 402 status code to let any server charge for a resource, and any client, human or machine, pay for it instantly with stablecoins like USDC.
Three properties make it different from every payment rail before it:
- No accounts. The payer needs a crypto wallet, not a login, an API key, or a subscription.
- HTTP-native. The payment happens inside the request and response cycle developers already use. No redirect to a checkout page.
- Machine-first. It was designed for software paying software. Humans can use it, but agents are the primary customer.
The standard is open source and chain-agnostic, with most volume today settling on Base (Coinbase's Ethereum layer 2) and Solana. There are no protocol fees.
That is the definition. The interesting part is how a payment actually moves.
How an x402 payment works, step by step
The whole flow is four HTTP messages and one onchain settlement:
- Request. An agent calls an API endpoint, say a market data service, like any normal HTTP request.
- 402 response. The server replies with status 402 Payment Required, including the price, the accepted stablecoin, the network, and the address to pay in the response body.
-
Signed payment. The agent's wallet signs a stablecoin transfer authorization for the quoted amount and retries the request with the payment proof attached in an
X-PAYMENTheader. - Verify and serve. A facilitator (a service that verifies and settles the payment onchain, so the API server never has to run blockchain infrastructure) confirms the transfer, and the server returns the data with a normal 200 response.
The entire cycle takes seconds. No login, no invoice, no card network. Coinbase runs a public facilitator that anyone can use, and Cloudflare offers x402 support in its agent tooling.
A useful way to think about it: HTTP already had a slot for "you need to pay for this." x402 just standardizes what goes in the slot and what a valid payment looks like.
Which raises the obvious question: is anyone actually using this?
The adoption curve so far
The numbers moved faster than almost anyone expected. As of March 2026, x402 had processed over 119 million transactions on Base and another 35 million on Solana, with roughly $600 million in annualized payment volume.
The institutional weight behind it grew just as fast. In late 2025, Coinbase and Cloudflare launched the x402 Foundation to govern the standard as neutral infrastructure, and the member list now includes Google, Visa, AWS, Circle, Anthropic, and Vercel. Google went further and wired x402 into its own Agent Payments Protocol, so agents built on Google's stack can settle payments over x402 rails.
When the company that runs a fifth of the web's traffic and the largest card network on earth both join the same payments standard, it stops being a crypto experiment.
Here is what the shift looks like side by side.
The old way vs the x402 way
| API keys and subscriptions | x402 | |
|---|---|---|
| Setup | Human signs up, verifies, adds card | None, wallet pays on first request |
| Pricing | Monthly tiers, often overpaying | Per request, pay for exactly what you use |
| Minimum payment | Usually dollars per month | Fractions of a cent |
| Who can pay | Humans with cards | Any software with a wallet |
| Settlement | Days, via card networks | Seconds, onchain |
| Fees | 2 to 3 percent plus fixed costs | Network gas, often under a cent, no protocol fee |
For a human buying one SaaS subscription, the old model is fine. For an agent making thousands of micro-purchases across services it discovers on the fly, only one column works.
And that second column is where this stops being abstract for me.
Where this touches real work
I operate AI agents daily for Fensory, my writing and publishing system, and the pattern x402 unlocks is one I keep running into. An agent that researches, writes, and publishes needs data: market feeds, search APIs, archive access. Today every one of those needs me to hold an account and an API key. The agent does the work, but I am still the procurement department.
Under x402, the agent gets a wallet with a budget and handles its own purchasing. A research agent with a $5 daily allowance can buy exactly the data calls it needs, from whichever service answers best, and the receipts are all onchain. That is not a demo scenario. Services already sell API access this way on Base today.
It also flips the seller side. Anyone publishing an API, a dataset, or even premium content can charge per request without building billing infrastructure. Add a 402 response, point at a facilitator, done.
But giving software its own money should make you at least slightly nervous, and it should.
What x402 does not solve
x402 answers "how does an agent pay?" It deliberately does not answer the harder questions around it:
- Trust. Paying for an API does not mean the API is honest. Verifying what an agent bought is a separate problem.
- Guardrails. A wallet that can spend autonomously needs spending limits, allowlists, and kill switches. Those live in the wallet layer, not in x402.
- Identity. Knowing which agent paid, and who is accountable for it, is still early territory.
The payment rail came first. The trust layer around it is being built right now, and it is where the most interesting open problems in the agent economy sit.
Thirty years of an empty status code, and the first real tenant moved in within a year. The question worth sitting with is not whether agents will spend money. They already do, a hundred million transactions over. The question is what happens to every business model built on the assumption that the customer is a person.
FAQ
What is x402 in simple terms?
x402 is a standard that lets software pay for things directly over the web. When a server asks for payment with an HTTP 402 response, the client, often an AI agent, pays in stablecoins and gets the resource seconds later. No account or checkout needed.
Who created x402?
Coinbase launched x402 in May 2025 as an open standard. It is now governed by the x402 Foundation, co-founded with Cloudflare, with members including Google, Visa, AWS, Circle, Anthropic, and Vercel.
Does x402 require an account or API key?
No. The payer only needs a crypto wallet holding a supported stablecoin such as USDC. Payment happens inside the HTTP request itself, which is what makes it usable by autonomous agents.
What blockchains does x402 use?
x402 is chain-agnostic. Most activity today settles on Base, Coinbase's Ethereum layer 2, with significant volume on Solana, and support expanding to other networks like Stellar.
Resources
- The x402 whitepaper covers the full protocol design.
- Coinbase's x402 documentation is the place to start building.
- Cloudflare's announcement of the x402 Foundation explains the governance and their agent tooling.
- This explainer from Eco is a solid second read on the payment flow.
Written by Ribhav Modi. Last updated June 2026.
Top comments (0)