Monetization Gateway
Monetization Gateway: Charging for Cloudflare Resources via x402
Date: 2026-07-01
Authors: Rohin Lohe, Justin Ridgely, Will Papper
Read Time: minutes

Cloudflare is proud to introduce the Monetization Gateway. This powerful engine enables our customers to monetize any asset they protect through our network—whether that be APIs, datasets, web pages, or MCP tools.
By providing a centralized control plane, the Gateway allows you to manage access controls and payment policies across all your apps. Crucially, it shields your origin server from the overhead of massive payment volumes by managing enforcement and verification directly at the edge.
At launch, all transactions will be settled using stablecoins via x402, an open-source protocol developed by the x402 Foundation in collaboration with over 25 industry pioneers.
The Paradigm Shift in Web Economics
For three decades, the internet operated on a fundamental trade-off:
"Content is provided for free in exchange for human attention."
This attention was then converted into revenue through e-commerce, subscriptions, or advertisements. However, as AI agents become the primary users of the internet, this bargain is collapsing.
Why the Old Model Fails Agents
Agents do not "consume" content like humans do:
- They don't click on ads.
- They have no desire for a monthly subscription to every single tool they might need.
- They typically access a data feed or page once, extract the necessary information, and depart.
Currently, AI crawlers may request content to times for every single human visitor they refer back to a site. This disparity necessitates a transition toward universal usage-based pricing.
The New Unit of Value
If the primary interface for the web is shifting toward AI-driven software and harnesses, agents must pay for their inputs (inference content, training data, API calls, and developer tools). The logical unit of payment is no longer the "seat" or the "month," but rather the request, the token, or the successful outcome.
Examples of Agentic Pricing:
- Web Search: A few cents per individual call.
- Upload Endpoints: \0.001+ $0.01$ per MB.
- Support Escalations: \0.99$ per resolution (paid only upon success).
This represents a fair exchange of value on neutral rails, ensuring creators are compensated when an answer engine utilizes their work.
Overcoming the "Micropayment" Barrier
While cloud providers have used metered billing for years, it was limited to known buyers with API keys. Content, meanwhile, relied on ads. We couldn't serve unverified buyers for sub-cent transactions because the cost of processing the payment often exceeded the payment itself.
Comparison of Billing Models
| Feature | Traditional Billing | Agentic Billing (x402) |
|---|---|---|
| Primary Metric | Per-request / Per-token | |
| Buyer Status | Verified/Account-based | Unverified/Anonymous |
| Transaction Size | High (Dollars) | Tiny (Sub-cents) |
| Settlement Speed | Days/Weeks | Sub-second |
| Friction | High (Checkout pages) | Zero (Embedded in HTTP) |
Implementing usage-based billing historically forced companies to become "payment companies," requiring massive backend overhauls to track usage auditably. Many defaulted to per-seat pricing because it was easier, even though a single agent can now outperform an entire human team.
The Solution: Stablecoins Assets like USDC and Open USD enable the transfer of minuscule sums across the globe with negligible fees and near-instant settlement.
How the Monetization Gateway Works
Cloudflare is uniquely positioned as the proxy layer between the buyer and the seller. We have already built extensive usage-based accounting for our own systems; now, we are extending that to you.
By moving payment validation into the request path, the metering and settlement are handled off your origin.
What you get:
- Full control over pricing rules.
- Direct revenue streams.
- No need to onboard buyers.
- No need to build a custom billing backend.
The x402 Protocol Explained
Named after the long-unused HTTP 402 Payment Required status code, x402 allows payments to happen directly over HTTP.
The Transaction Flow:
Technical Example:
When a client hits a gated resource, the exchange looks like this:
1. The Server's Response:
HTTP/1.1 402 Payment Required
Content-Type: application/x402-payment
Payload: {
"price": "0.005",
"asset": "USDC",
"address": "0x123...abc"
}
2. The Client's Follow-up: The client pays the wallet and resubmits the request with the payment proof attached in the header, avoiding any redirects to external checkout pages. Settlement is peer-to-peer, meaning funds go directly from the buyer's wallet to the seller's wallet.
Evolution of Content Control
The Monetization Gateway is the culmination of a journey toward creator autonomy:
- Content Independence Day: One-click control over AI crawler access.
- Pay Per Crawl: The ability to charge crawlers for access.
- Monetization Gateway: The ability to charge any caller for any resource (APIs, data, MCP tools) without building the payment infrastructure.

Meet the Team:
Rohin Lohe
Justin Ridgely
Will Papper