x402 explained: the open payment rail for AI agents and the parts it leaves open
Two things happened in the last six weeks that look unrelated:
- On September 30, Cloudflare opened a closed beta of its Monetization Gateway, which lets a site or API behind Cloudflare charge AI agents per request. Payment settles in USDC on Base through Coinbase's x402 facilitator.
- On September 9, TRM Labs went through x402's on-chain history, about $52.7 million across 198.9 million settlements since May 2025. After screening out self-payments and bulk flows, $25.62 million was left. TRM put the share of that which looks like agents at 0.6% to 7.5%.
The first story is about a payment rail getting real distribution. The second is about what the rail cannot tell you: who is on the other end of the payment, and who answers for it. They are the same story, and programmatic advertising already lived through both halves of it.
What x402 is
x402 is an open payment protocol that lets software pay for a web resource inside the HTTP request itself. A server that wants payment answers with status code 402, "Payment Required," plus a price. The client, usually an AI agent with a wallet, signs a payment and retries. The server settles it and returns the resource. There is no account or API key, and no checkout page.
Coinbase launched it on May 6, 2025. In September 2025, Cloudflare and Coinbase announced plans for a neutral x402 Foundation. The Linux Foundation took it on, and on July 14, 2026 announced the foundation was operational with 40 members and the protocol fully contributed by Coinbase. On October 1 it named Michael Hursta executive director and put membership above 50. The spec is Apache-2.0, and anyone can run a facilitator.
Payments are mostly stablecoins. TRM found 99.6% of settled value was in USDC. Chainalysis found that over 87% of x402 payments in the 16 months to September 2026 fell between a hundredth of a cent and a dime.
How an x402 request flows
An x402 payment happens in five steps, and the payment and the delivery land in the same HTTP exchange.
- The agent requests a resource, for example a paid API endpoint.
- The server returns 402 with a PAYMENT-REQUIRED header carrying the price, accepted token, network and receiving address.
- The agent signs a payment payload from its wallet and retries the request with a PAYMENT-SIGNATURE header.
- The server verifies and settles the payment, directly on-chain or through a facilitator. The facilitator does not hold funds. It checks the signed payload and broadcasts it.
- The server returns the resource with a PAYMENT-RESPONSE header confirming settlement.
The useful part for anyone who has reconciled media invoices is step five. The payment and the delivery happen in the same exchange, and the settlement is on a public ledger.
The vending machine
x402 is a vending machine you can bolt onto any URL. Think about a vending machine. You put in a dollar and a soda drops. There is no account, no card on file, no cashier, and the machine does not care who you are. For a dollar, that is the correct design. The seller does not want a relationship and neither do you. The governance is better than the machine deserves: an open spec under a neutral foundation, with no single company that has to approve you. That is genuinely good work. It is also a machine with nobody standing next to it.
And the vending machine story is worth finishing, because it is where the analogy gets uncomfortable. When the machine eats your dollar, there is a phone number on a sticker, and you do not call it. You eat the loss because a dollar is not worth the call. That is x402's refund model today. The x402 FAQ says the standard exact scheme is irreversible once executed, and a refund is the seller sending a new transfer back. Vending machines also taught a generation of teenagers to tilt them. On October 13, x402's maintainers merged a fix for a bug where a HEAD request could reach a paid GET handler without any payment check, so the handler ran in full and the seller was never paid. The patch was not yet in a published package as of October 16, according to LLM4Agents.
Then there is the price ceiling. Vending machines never grew up to sell televisions. Above some price, people want a cashier and a manager they can complain to, and that is exactly what the card networks are selling to agents.
x402 vs AP2 vs Visa, Mastercard and Stripe agent tokens
These are not all the same kind of thing. x402 is a rail. AP2 is an authorization framework that can sit on top of a rail. The card programs and Stripe's tokens are credentials on the existing card rails.
| x402 | Google AP2 | Visa Intelligent Commerce | Mastercard Agent Pay | Stripe Shared Payment Tokens | |
|---|---|---|---|---|---|
| What it is | Payment inside the HTTP request | Protocol for proving what a user authorized | Tokenized agent credentials on Visa | Agentic Tokens for registered agents | Scoped token a seller accepts through Stripe |
| Launched | May 6, 2025 | Sept 2025 | April 30, 2025 | April 29, 2025 | 2025; network and BNPL tokens added March 3, 2026 |
| Governance | x402 Foundation (Linux Foundation) | Google with 60+ collaborators | Visa | Mastercard | Stripe |
| Settlement | On-chain, 99.6% USDC (TRM) | Payment-agnostic; x402 via the A2A x402 extension | Card rails | Card rails | Card rails, plus Affirm and Klarna |
| Disputes and refunds | Not in the base scheme; seller-sent refunds or third-party escrow | Depends on the rail underneath | Visa says it helps manage disputes | Mastercard lists consumer dispute support | Through the network the token resolves to |
| Agent identity | Not in the base protocol | User mandates | Agent verification tied to the card | Agents must be registered and verified | Inherited from the token |
| Leave without rebuilding | Yes: open spec, any facilitator | Mostly: open protocol, Google-led | No: Visa's token format and rules | No: Mastercard's token format and rules | No, unless you leave Stripe |
The fact that carries the judgment is the x402 Foundation's member list. Visa, Mastercard, American Express and Stripe are all premier members of the foundation for the open rail, while each runs its own credential program on the closed one. That is a sensible hedge. Card tokens and open rails both produce trust. Only the tokens come with a toll booth, and the booth operators have bought a ticket for the open road.
What it means for advertising and agent-to-agent commerce
Programmatic already ran this experiment. For years a bot and a person produced the same impression log, and the industry paid for the difference until independent verification and supply-chain files made the gap visible. TRM's line on x402 could have been written about ad fraud a decade ago: "a scheduled script and an agent produce the same record."
The proxy metric problem is here too. The x402.org counter showed 75.41 million transactions and $24.24 million over the last 30 days for a fourth straight week, according to LLM4Agents. Paymentscan, which counts only facilitators on its list, has October at $848,200 so far. A census of Coinbase's Bazaar catalog on October 16 found the median called resource had exactly one unique payer. A transaction count is a proxy. Distinct payers and repeat funding are the numbers worth asking for.
For advertising, x402 fits the small, frequent calls around a media buy before it fits the buy itself. Agent-negotiated media deals carry approvals, makegoods and brand safety checks that an irreversible push payment does not model. Per-request data and verification calls fit the vending machine well. So does a publisher charging agents to read content, as a second line of publisher monetization next to advertising.
At Adgentek we build on open, publicly documented standards, and we are a founding member of AdCP, the Ad Context Protocol, through AgenticAdvertising.org, because a buyer or seller should be able to change partners without rebuilding. That is the test the Agentic Ad Server on the sell side and ORCA on the buy side already meet: advertisers set the ceiling, agents execute inside it, and either side can leave. Payment rails get the same test. The rail should be the one the seller supports, with humans setting the ceiling and agents executing inside it. Chainalysis put the accountability point well: "Accountability must trace to whoever deployed and funded the agent, not the agent itself."
Expect the dispute and identity layers for x402 to get built quickly, as escrow and agent credentials sold as services. Proof put an identity draft called x401 into production on October 15, with payment kept explicitly in 402. The valuable company in this stack is whoever can tell a merchant which human stands behind an agent, not another facilitator.
What to watch
Four things decide whether x402 becomes neutral infrastructure or an open spec with closed traffic: payer-level numbers, a dispute scheme, facilitator choice, and portable identity.
Whether the foundation publishes payer-level numbers that reconcile with independent on-chain trackers. If it does, the headline is a record. If the homepage keeps showing a frozen transaction count, it is marketing.
Whether a dispute scheme lands in the core spec. If any facilitator can offer escrow and arbitration under the open standard, the gap gets filled in the open. If refunds only exist inside one provider's product, a toll booth grows at the edge of an open rail.
Whether Cloudflare's gateway lets sellers pick their facilitator. Today it settles through Coinbase's, and buyers and sellers must be in the United States. If that opens up, x402 distribution is a market. If every settlement there runs through one facilitator, the neutrality lives in the spec and not in the traffic.
And whether identity stays portable. If an agent can prove who funded it once and carry that across sellers and rails, merchants can price the risk. If each network issues its own agent identity, we are back to one-to-one integrations, one level up. Programmatic took most of a decade to get supply-chain transparency. The October 13 HEAD fix was the ninth route-matching fix in x402 since August, according to LLM4Agents.
If you are deciding whether to accept x402 payments, Adgentek wants to hear what is stopping you. Those replies are the most useful input into this work.
Sources
- Coinbase, Introducing x402: a new standard for internet-native payments, May 6, 2025
- Cloudflare, Cloudflare and Coinbase Will Launch x402 Foundation, September 23, 2025
- Coinbase, Google Agentic Payments Protocol + x402: Agents Can Now Actually Pay Each Other, September 16, 2025
- Google Cloud, Announcing Agent Payments Protocol (AP2), September 2025
- Google Agentic Commerce, A2A Protocol: x402 Payments Extension v0.2, accessed October 18, 2026
- Mastercard, Mastercard unveils Agent Pay, April 29, 2025
- Visa, Find and Buy with AI: Visa Unveils New Era of Commerce, April 30, 2025
- Stripe, Supporting additional payment methods for agentic commerce, March 3, 2026
- Payments Dive, Visa, Mastercard jockey to set agentic standards, March 5, 2026
- The Linux Foundation, Linux Foundation Announces Operational Launch of x402 Foundation, July 14, 2026
- TRM Labs, Who's Actually Paying? Measuring AI Agent Payments Onchain, September 9, 2026
- Cloudflare Docs, Monetization Gateway, updated September 30, 2026
- Cloudflare Docs, x402, updated October 15, 2026
- The Linux Foundation, Linux Foundation Appoints Michael Hursta as Executive Director of the x402 Foundation, October 1, 2026
- AI Affairs, Cloudflare opens beta for AI agents to pay per request through HTTP 402, October 3, 2026
- Chainalysis, North America: Inside the Growth of Agentic Commerce, October 14, 2026
- LLM4Agents, Agentic week: payments, payers and the person behind them, October 16, 2026
- x402, FAQ, accessed October 18, 2026
- x402.org, Home (Last 30 Days counter), accessed October 18, 2026
- Paymentscan, x402 Payment Metrics, accessed October 18, 2026
About Adgentek
Adgentek is building the advertising stack for the agentic era, enabling advertisers to buy against business outcomes across AI surfaces and traditional media. Its two-sided infrastructure gives agents the flexibility to plan, transact, and optimize across the media ecosystem while preserving the human guardrails and publisher control advertising requires. Named a Unified Media Platform by adtech and martech venture capital firm Aperiam, Adgentek represents an emerging category of AI-native software that brings media planning, buying, measurement, and optimization together across channels.
