Cloudflare Monetization Gateway beta lets AI agents pay per request via HTTP 402 and x402, settling in USDC on Base
The closed beta puts machine-readable pricing and settlement behind URLs, APIs, MCP tools and datasets, with four customers already live.
What happened
Summary of reporting by Intelligent CIO Middle EastCloudflare has opened a closed beta of its Monetization Gateway, reported by Intelligent CIO Middle East. The platform lets domain owners attach metered pricing to any URL, API endpoint, Model Context Protocol (MCP) tool or dataset, allowing autonomous AI agents to settle charges directly inside HTTP requests.
When an agent accesses a monetised resource, it receives an HTTP 402 Payment Required status code alongside machine-readable payment parameters. The agent signs a cryptographic payment payload, which Cloudflare verifies and settles on-chain before serving the underlying resource. Pricing rules run on URLs, headers and query parameters, eliminating human checkout flows and manual account creation.
Settlement currently operates in USDC on the Base network. Four launch customers are running the system in production: Cloudflare AI Gateway, which bills US inference customers per request instead of requiring prepaid credits; Ceramic.ai, which charges per search across an index of 40 billion pages; Stocktwits, which unbundles market data into per-call sentiment and ticker metrics; and API2PDF, which supports dynamic pricing with a per-request spending ceiling without requiring API keys.
The service handles payment verification, settlement, transaction failures, retries and usage analytics. Cloudflare announced that alternative payment rails, audit logs, agent discovery systems and identity primitives are in development. Wire communication relies on the x402 open payment protocol standard.
The Azrty take
Agent metering is now a CDN feature, so the hard part of machine commerce has moved from plumbing to pricing, settlement and fraud.
For anyone in the GCC selling data, APIs or inference, the strategic point is this: the cost of accepting a machine customer just collapsed to near zero, and the pricing decision is now the only thing that matters. If your revenue depends on a data licence, an annual API contract or a seat count, an agent that can pay $0.001 per action will undercut you unless you design for it deliberately. The GCC opportunity is real: regional financial data, Arabic content archives, logistics and shipping feeds, and sovereign or enterprise MCP tools are exactly the kind of discrete, high-value resources an agent will pay to reach. The risk is equally real, and it settles in USDC on a US chain before your finance team has seen a single invoice.
Look at who is already live. Cloudflare AI Gateway is charging US customers per request for inference rather than forcing a prepaid balance. Ceramic.ai is selling per-search access to a 40 billion page index. Stocktwits is unbundling a data licence into per-request market signals. API2PDF exposes variable pricing with a maximum price cap per call. Two pricing shapes dominate: Cloudflare's Per-Token records total_billed_units, total_units and total_cost_micros on each call, with text fields priced at $12.50 per 1M tokens and billed in 50-token increments, as documented in the Cloudflare blog. Per-Action charges $0.001 per session per action and splits the revenue 60% to the operator and 40% to whoever authored the description the agent used. Those two shapes, per token and per action, cover most real cost structures. Price per request when your cost is per token and you will lose money on long contexts.
The wire format is the part most teams will implement badly. The x402 specification v2 carries a base64 PAYMENT-REQUIRED header from server to client, a PAYMENT-SIGNATURE header back from the client, and a PAYMENT-RESPONSE header on the way out. A facilitator exposes POST /verify (read-only, must not commit state) and POST /settle (commits state, broadcasts the transaction). The exact scheme on EVM uses EIP-3009 transferWithAuthorization for USDC so the facilitator pays the gas while the payer keeps cryptographic control of amount and destination, with Permit2 as the universal ERC-20 fallback and ERC-7710 for smart accounts. Every payload carries a 32-byte nonce and validAfter/validBefore bounds, and there is a maxTimeoutSeconds on the quote. This is a settlement contract with replay protection and expiry windows, not an HTML paywall with a price tag on it. Treat it like a payment ledger from day one.
How Azrty would approach it: put a gateway in front of both the models and the tools, so one place holds routing, budgets, per-agent entitlements and the 402 response. Our FastLLM Proxy already sits in front of our own LLM servers and 80 hosted providers as an OpenAI-compatible endpoint with routing, budgets and access control in one place, which is the natural place to attach a per-agent credit ledger and to enforce a max price cap per call. On the tool side, we would expose MCP tools through AI engineering work that emits a proper PaymentRequired object and then reconciles verify and settle asynchronously, because chain latency must not gate your authz decision. The configuration knob on a monetised MCP tool is small; the surrounding ledger is the work:
{
id: "fetch-https://api.example.com/market-data",
version: "1.0.0",
name: "Fetch market data",
// $0.001 USD per session per action, capped per request "cloudflare:authorization": { type: "per-action", default: { pricing: [{ price: 0.001 }], revenueShare: { "https://agents.md/": 0.4 } } } }
Where most teams will get it wrong: first, they will publish an external price before they know their unit cost. Compare your margin against Workers pricing, where the $5/month Paid plan includes 10M requests and then charges $0.30 per additional million, plus $0.02 per million CPU milliseconds and $0.09 per GB of outbound transfer. Second, they will make access synchronous with settlement, which means agents stall on confirmation. Cloudflare's own Per-Action integration exposes a dont_wait_for_settlement flag precisely because this bites. Third, and specific to this region, nobody will have picked the legal entity that holds USDC on Base, nor agreed how revenue in a dollar-pegged stablecoin maps to AED or SAR books. Get finance and compliance in the room in the same month as engineering, not after the pilot.
What to do now
- Request access to the Monetization Gateway closed beta through your Cloudflare account team and pick exactly one pilot resource: a single MCP tool or one high-value API route. Put a per-request maximum price cap on it, the way API2PDF does, so no one agent call can run away.
- Pin the wire format to x402 specification v2 from the x402-foundation/x402 repository. Implement the facilitator POST /verify and POST /settle contract, store the 32-byte nonce and the validBefore timestamp per payment, and reject replays. Do not build against the older Coinbase v1 header names.
- On Cloudflare Workers, turn on Per-Action or Per-Token for one internal tool first and log total_cost_micros against every call. Baseline real unit cost against Workers Paid at $5 per month, 10M requests included and $0.30 per additional million, before you publish any external price.
- Stand up the treasury and FX decision this month: name the entity that will hold USDC on Base, agree revenue recognition with finance, and document the AED or SAR conversion policy before marketing announces anything.