x402 Explained: How AI Agents Pay for Things Online

x402 Explained: How AI Agents Pay for Things Online

By Elena Rodriguez, Developer Experience Editorial Desk · September 29, 2026 · Updated November 14, 2026 · 6 min read

Updated November 14, 2026: Added a comparison of x402, AP2 and ACP built from each protocol's own specification.

Quick Answer

x402 is an open payment standard that uses the unused HTTP 402 Payment Required code so software can pay for a web request in stablecoins, without an account or card. TRM Labs found $52.7 million settled across 198.9 million transactions, but only 0.6 to 7.5 percent of the genuine commerce value appeared to come from AI agents.

LiveBTC—·ETH—·Gas—via CoinGecko

A status code nobody used

The HTTP specification reserved status code 402 for "Payment Required" and then left it empty for about thirty years. Every other code found a job. This one waited for a use case that did not exist yet: a machine that needs to buy something, immediately, for a fraction of a cent, without a person in the loop.

x402 is the standard that finally uses it. Whether the machines doing the buying are actually AI agents is a separate question, and the honest answer is mostly not yet.

How the flow works

The mechanism is deliberately small. There is no new transport, no session and no account.

  1. A client requests a resource: an API endpoint, a dataset, an article, a model inference.
  2. The server responds 402 Payment Required, with instructions attached: the amount, the asset, the chain and where to send it.
  3. The client signs a stablecoin payment for that amount and repeats the request with the proof attached.
  4. The server verifies the payment and returns the content.

The entire cycle completes in seconds, and nothing about it requires the client to have registered, stored a card, or been a human being. For a server, it converts an audience of subscribers into an audience of anyone who can pay 30 cents, including software.

Most implementations put a facilitator between the server and the chain to verify and settle, so the origin server does not have to run blockchain infrastructure to accept a payment.

x402 vs AP2 vs ACP: what is the difference?

x402, AP2 and ACP are different layers rather than rivals. As of 14 November 2026, x402 settles a payment inside an HTTP request, AP2 (Google) records what a user authorized an agent to buy through signed mandates, and ACP (OpenAI and Stripe) standardizes checkout between agent and merchant. AP2's own samples include an x402 payment flow.

The table below compares the three using only each protocol's own documentation, as read on 14 November 2026. Third-party comparison blogs disagree with one another and are not used here.

x402AP2 (Agent Payments Protocol)ACP (Agentic Commerce Protocol)
------------
Maintained byx402 Foundation (repository x402-foundation/x402, Apache-2.0); Coinbase's repository is now a development fork, and Coinbase hosts the docs and a facilitatorGoogle (repository google-agentic-commerce/AP2); the AP2 site says standardization is moving to FIDO Alliance working groupsOpenAI and Stripe as Founding Maintainers, with consensus-based governance and a stated path toward neutral foundation stewardship
Layer it coversPayment settlement: the server answers 402 with a price, the client pays and retriesAuthorization: signed Checkout Mandates and Payment Mandates, chained as verifiable credentialsCheckout: the Agentic Checkout API plus a Delegate Payment spec for passing payment tokens
Payment railsStablecoins on blockchains; Coinbase's docs name Base and Solana, and the repository lists EVM, Solana and several other chain SDKs; x402.org says it can extend to traditional methodsInstrument-agnostic; the first version targets cards, with wallets, real-time bank transfers (UPI, PIX) and digital currencies on the roadmapNot specified by the spec; the merchant's payment processor handles authorization and settlement, and handlers are listed per merchant
Human approval modelNot described in the specification or Coinbase docs; any spending limit sits with the wallet or clientExplicit: human present, the user signs each closed mandate; human not present, the user signs open mandates with constraints and the agent signs the closed onesNo standalone confirmation step; a merchant can return a "requires buyer review" or "requires buyer input" message
Statusx402.org calls it production-ready (the project's own claim); Coinbase says its facilitator has processed more than 100 million paymentsVersion 0.2Beta; latest stable spec dated 2026-04-17, Apache-2.0

The layers fit together rather than compete. AP2 answers "did the user allow this purchase?", ACP answers "how does the agent complete an order with this merchant?", and x402 answers "how does the money move for this request?". The TRM Labs figures below describe only the x402 layer.

One disambiguation: "ACP" here means the Agentic Commerce Protocol. A separate Agent Communication Protocol, an agent-to-agent messaging standard, shares the acronym; its own site says it is now part of A2A under the Linux Foundation, and it has no payment role.

Who is behind it

x402 originated at Coinbase, and a foundation formed with Cloudflare in 2025 to push it as a shared standard rather than a single company's protocol. Stripe, Google and Cloudflare have all built support into their own services, which is the part that matters: a payment standard with one implementer is a product, and a payment standard with several is infrastructure.

The specification itself is public, and Coinbase publishes the developer documentation for implementing it on both the server and client side.

It is not the only proposal. Tempo, the payments chain incubated by Stripe and Paradigm, shipped a machine payments protocol alongside its mainnet launch in March 2026. Expect a standards fight rather than a coronation.

The numbers everyone quotes

Here is where the category gets interesting, and where most coverage stops reading.

Blockchain intelligence firm TRM Labs examined x402 activity from May 2025 onward across Base, Solana and Polygon. The analysis reported by PYMNTS found:

MeasureFigure
------
Total settled value examined$52.7 million
x402 settlement transactions198.9 million
Share settled in USDC99.6% ($52.47M of $52.68M)
Value that looked like genuine commerce after filtering$25.62 million
Share of that commerce value appearing to be agentic0.6% to 7.5%

Two things fall out of that table immediately.

The average transaction is about 26 cents. Divide $52.7 million by 198.9 million transactions and you get the shape of the traffic: enormous numbers of tiny payments, which is exactly what the standard was designed for and exactly what no card network could process economically.

Less than half the value looked like commerce at all, and of what remained, the agent share was somewhere between one payment in a hundred and one in thirteen. That is the number to remember the next time you read that agents are already transacting at scale.

Why is the agent share a range rather than a number?

This is the most important methodological point in the whole category, and it is not a criticism of TRM's work. It is a limit on what chain analysis can do.

An AI agent deciding to buy a dataset, and a cron job that buys the same dataset every hour, produce **identical records onchain**. Same wallet, same signature, same call. There is no field in the transaction that says "a model chose this". Any estimate of agentic share therefore relies on heuristics about timing, variety and behaviour, and those heuristics have wide error bars by construction.

So when a vendor tells you that agentic commerce is growing at some precise percentage, ask how they separated agents from scripts. If the answer is onchain data alone, the precision is decorative.

What this is actually good for today

Strip out the agent narrative and a real product remains.

  • Paid APIs without contracts. A data provider can price per call and serve anyone, with no sales cycle, no minimum and no invoice.
  • Metered access to content and models. Inference, transcription, search results and archives can all be sold by the request rather than the month.
  • Machine-to-machine settlement inside one company. Teams already use it to meter internal services without building a billing system.
  • The groundwork for agent commerce, which is the bet everyone is actually making. The rail needs to exist before the traffic arrives, and it now does.

If you are building the agents that would eventually use this, our guides to autonomous AI agents and agent interoperability cover the layers above the payment, and our comparison of agent sandboxes covers where that code runs.

What to watch before you build on it

Refunds and disputes. A card payment can be reversed; a settled stablecoin payment cannot. If your agent buys the wrong thing, recovery is a commercial conversation, not a chargeback.

Spending limits. An agent with a funded wallet and a bug is a budget with no floor. Whatever you build, the limit belongs outside the agent, enforced by the wallet or the facilitator rather than by a prompt instruction the model can talk itself out of.

Security research is active. Academic work has already examined free-riding and data-leakage risks in x402 flows. Treat the standard as young, because it is.

Jurisdiction and reporting. Thousands of micro-payments a day are still payments. If your business needs to account for them, build that in from the start rather than reconstructing it from chain data later.

Conclusion

x402 is a genuinely good piece of engineering: a dormant status code, a stablecoin, one retry, and suddenly software can buy things. The standard works, the volume is real, and the major infrastructure companies are behind it.

The agent story attached to it is running well ahead of the evidence. Nearly 200 million transactions have settled, most of the value is not identifiable as commerce, and the portion that looks autonomous is a single-digit percentage at best. Both of those things can be true at once: the rail is being built now, and the traffic it was built for has not arrived yet.

If you sell data or inference, it is worth implementing today for the human-directed automation that is already paying. If you are waiting for agents to pay you, watch the share rather than the headline.

This explainer is an editorial synthesis of protocol documentation and published analysis read on 29 September 2026 and linked inline; the x402, AP2 and ACP comparison was checked against each protocol's own documentation on 14 November 2026. The transaction and agentic-share figures come from TRM Labs research as reported by PYMNTS; we did not independently reproduce them. We did not implement or test x402 in production, and we hold no position in any asset mentioned. This is not investment or legal advice.

Sources

The primary sources this article cites, checked in November 2026:

Key Takeaways

  • x402 revives the long-unused HTTP 402 status code so a server can quote a price and get paid in one request cycle.
  • The flow is a single retry: request, 402 with payment details, signed stablecoin payment attached, request again, content returned.
  • TRM Labs found $52.7 million settled across 198.9 million x402 transactions on Base, Solana and Polygon, 99.6 percent of it in USDC.
  • After filtering non-commerce activity, about $25.62 million looked like genuine commerce, and only 0.6 to 7.5 percent of that appeared agentic.
  • The agent share is a range because a scheduled script and an autonomous agent leave identical records onchain.
  • Tempo, the Stripe and Paradigm chain, launched its own machine payments protocol with its mainnet in March 2026.

Frequently Asked Questions

What is x402 in simple terms?

x402 is an open standard that lets a server answer a web request with a price instead of a login prompt. The client pays that price in stablecoins and retries, so software can buy access to data, an API or a model inference without a human, an account or a card on file.

Why use HTTP 402 rather than a normal checkout?

A checkout assumes a person: it needs an account, a card on file, a redirect and usually a session. A machine making one request for a fraction of a cent cannot do any of that economically. The 402 status code was reserved for exactly this purpose in the original HTTP specification and then never used.

Are AI agents really paying for things with x402?

Some are, but far fewer than the headline numbers imply. TRM Labs found that of about $25.62 million in genuine commerce value, only 0.6 to 7.5 percent appeared to be agentic. Most volume comes from automated scripts and testing, and because scripts and agents look identical onchain, the share can only be estimated as a range.

Do I need a blockchain wallet to accept x402 payments?

Yes, in the sense that settlement happens onchain and the funds need somewhere to arrive. Most implementations, however, put a facilitator between the server and the chain to verify and settle payments, so the origin server does not have to run blockchain infrastructure itself. That is how most production setups work today.

Is x402 the only standard for machine payments?

No. Tempo, the payments chain incubated by Stripe and Paradigm, launched a machine payments protocol alongside its mainnet in March 2026, and other proposals exist in academic and industry work. x402 currently has the most visible adoption, helped by support from Coinbase, Cloudflare and Stripe, so expect a standards fight.

About the Author

Elena Rodriguez avatar

Elena Rodriguez

Developer Experience Editorial Desk

Developer Experience Editorial Desk · Web3AIBlog

Elena Rodriguez is a pen name for our developer-experience editorial desk. Posts under this byline are written and reviewed by working engineers covering full-stack development, Web3 dApp architecture, deployment workflows, build tooling, and developer productivity. The desk specializes in turning real production debugging — failed deploys, flaky tests, memory leaks, broken migrations — into reproducible field manuals. Code samples in our tutorials are built from and verified against the official SDKs and documentation, with library versions pinned, before publication.