By · Founder, Stacktree · Last updated
blog

Cloudflare just made the 402 wall a checkbox.

Cloudflare announced its Monetization Gateway: pricing rules in a dashboard, x402 enforced at the edge, stablecoin settlement straight to your wallet, for pages, APIs, datasets, and MCP tools. We have been running exactly this pattern in production, by hand, so here is a plain reading of what Cloudflare shipped, what it does not cover, and what building one taught us.

Get started free

What is the Cloudflare Monetization Gateway?

A payment layer, announced July 1, 2026 and waitlist-only for now, that lets anything behind Cloudflare charge per request over the x402 protocol. You define pricing rules in one control plane; the edge answers unpaid requests with HTTP 402 and payment terms, verifies the stablecoin payment when the buyer retries, and passes the paid request to your origin. The buyers it is built for are AI agents, which carry wallets instead of cards.

What Cloudflare shipped

The Monetization Gateway is a single control plane for charging money for HTTP resources: web pages, datasets, API endpoints, and MCP tools. You write pricing rules, which can vary by HTTP verb or by task, and Cloudflare enforces them at the edge. A request that has not paid gets a 402 Payment Required response with the price, asset, and recipient. The buyer pays in stablecoin, USDC among them, along with Open USD, the consortium stablecoin announced the same day by Open Standard with Stripe, Visa, Mastercard, Google, Coinbase, and Cloudflare itself among its 140-plus partners. The buyer retries with proof of payment and the request goes through. Settlement is peer-to-peer to your wallet, in about a second, for a fraction of a cent, with no chargebacks.

Two design details are worth noticing. First, the gateway can intercept a 401 from your origin and convert it into a 402 with payment terms, which means an existing auth-gated API can become a paid API without changing origin code. Second, the protocol underneath is x402, the open standard that revives the 402 status code, now stewarded with an x402 Foundation of more than two dozen partners. Cloudflare's worked examples are small: a cent per API call, a fraction of a cent plus per-megabyte pricing for uploads, ninety-nine cents for a resolved support escalation. The buyer in every example is software.

This extends a direction Cloudflare has been signalling for a while, first with letting sites charge AI crawlers for access, now generalized to any resource and any agent.

Why the edge is the right place for a 402

A 402 challenge is a handshake: request, challenge, payment, retry. If your origin handles it, every unpaid probe costs you compute, and every paid retry adds a round trip. Enforcing at the edge moves the whole handshake next to the buyer, across Cloudflare's few-hundred-city footprint, and your origin only ever sees requests that have already paid. For sellers, that is the same argument as putting a WAF at the edge rather than in your app. It is the architecturally obvious place for this to live, which is part of why this announcement matters: the obvious place is also a network that fronts a large slice of the web.

What it means: the plumbing is commoditizing

Full disclosure before the opinion: we run agent payments in production at Stacktree, so we are describing our own market here. Our front-door at agents.stacktr.ee charges agents fifty cents to publish a page, and we built the 402 handling, verification, and settlement plumbing ourselves. That was real work a year ago. Cloudflare just turned most of it into configuration.

We think that is good news, including for us. The hard part of agentic commerce was never the paywall; it is everything around it. When any Cloudflare customer can flip on a 402 wall, the number of things agents can buy grows by orders of magnitude, agent wallets become table stakes in the frameworks, and the whole buyer side matures. Sellers stop competing on plumbing and start competing on whether an agent actually wants what they sell. That is the competition we want to be in: our product is the thing behind the 402, hosting an agent can buy in one call, not the 402 itself.

What the gateway does not cover

Three gaps, read plainly from the announcement rather than as criticism of a waitlist product.

  • It is x402-only. There is no mention of MPP, the Machine Payments Protocol from Stripe and Tempo, whose onchain method settles on Tempo. Agents do not all hold the same asset on the same chain, and a seller who wants to never be the reason an agent cannot pay has to care about rail coverage. We accept x402 on Base, x402 on Solana, and MPP on Tempo on one endpoint for exactly that reason.
  • Payment is not discovery. A 402 wall monetizes the agents that arrive; it does not make agents arrive. In practice, being listed where agents look for paid resources, directories like x402scan and mppscan, did more for us than any plumbing decision. The gateway does not do this for you.
  • It monetizes your resources; it is not a product. The gateway is for people who already have something worth paying for behind Cloudflare. The work of having an API an agent wants, priced per action in amounts an agent can justify, is still yours.

Notes from running this in production

For anyone joining the waitlist and planning their first paid endpoint, three things we learned taking real agent money.

Price per action, in cents. Cloudflare's examples are cents, and that matches what we see. An agent justifying fifty cents against a completed task is an easy call; an agent justifying a subscription is not a call it can make at all. Metered, per-action pricing is not a downgrade from SaaS pricing, it is the native shape of software buying from software.

The response after payment matters more than the challenge before it. An agent that pays needs a machine-readable result it can act on immediately: the URL, the id, the receipt. We return the published page's URL and management details in the paid response, and the on-chain settlement doubles as a claim ticket the buyer can later use to prove ownership.

Expect the long tail to be agents you never met. Our endpoint gets paid by agents whose operators never read our docs, because the 402 challenge is self-describing and the directories are machine-readable. Design for a buyer that discovers, evaluates, pays, and consumes without a human in the loop, because that is who shows up.

What to watch

  1. Waitlist to GA. The gateway is early access as of July 1, 2026. Which plans get it, and what Cloudflare's cut is, will shape who turns it on.
  2. Rail coverage. Whether an MPP method lands alongside x402, and which chains the x402 side supports at GA. Multi-rail at the edge would be a meaningful step for the whole ecosystem.
  3. MCP tool monetization. Charging per MCP tool call is listed as a first-class use case. If that pattern takes, every MCP server becomes a potential storefront, which changes the economics of building them.
  4. Discovery. Whether Cloudflare surfaces paid resources to agents somewhere, or leaves discovery to the existing directories. A registry with Cloudflare's footprint would be the other half of the market.
FAQ

Frequent questions

What is the Cloudflare Monetization Gateway? +
A payment layer Cloudflare announced on July 1, 2026 that lets any site or API behind Cloudflare charge for requests using the x402 protocol. You set pricing rules in one control plane, and Cloudflare enforces them at the edge: a request without payment gets HTTP 402 with the price, the buyer pays in stablecoin, and the paid request goes through to your origin. It is waitlist-only at announcement.
How does x402 work? +
x402 revives the HTTP 402 Payment Required status code. A client requests a paid resource and gets back a 402 response carrying the price, asset, network, and recipient. The client signs a stablecoin payment for that exact amount and retries the request with proof of payment; a facilitator verifies and settles it, and the server returns the resource. No account, no card, no checkout page, which is what makes it workable for software.
What can you charge for with the Monetization Gateway? +
Anything Cloudflare fronts: web pages, datasets, API endpoints, and MCP tools. Pricing rules can vary by HTTP verb or task, and the gateway can also intercept a 401 from your origin and turn it into a 402 with payment terms. Cloudflare's examples run from a cent per API call to a dollar for a resolved support escalation.
Does the Cloudflare Monetization Gateway support MPP? +
Not per the announcement. The gateway speaks x402, settling in stablecoins like USDC. MPP, the Machine Payments Protocol from Stripe and Tempo, is the sibling standard whose onchain method settles on Tempo, and it is not mentioned. Rails matter because agents do not all hold the same asset: at Stacktree we accept x402 on Base, x402 on Solana, and MPP on Tempo on one endpoint for exactly that reason.
When is the Monetization Gateway available? +
It was announced July 1, 2026 as waitlist-only. Cloudflare customers can sign up for early access; there is no general availability date in the announcement.
How do AI agents actually pay for things? +
With a wallet instead of a card. The agent holds stablecoin, reads the 402 challenge from the server, signs an authorization for the exact amount, and retries the request. Settlement lands on-chain in about a second for a fraction of a cent in fees. The agent never creates an account and no human clicks a checkout. This is live today: agents pay Stacktree fifty cents per publish this way, with the receipts on-chain.
Keep reading

Related guides

References

Sources and further reading

Want to see an agent pay a 402 today?

Our endpoint is live: an agent posts HTML, reads the 402, pays fifty cents over x402 or MPP, and gets a private page back. No account, no card, no waitlist.

Sign up free →