Cloudflare will let sites charge AI agents per request via x402 micropayments
Original source
Monetization Gateway: Charge for any resource behind Cloudflare via x402
Hacker News →Cloudflare is building a Monetization Gateway that lets its customers put a price on any resource behind its edge — web pages, APIs, datasets, or MCP tool calls — and collect payment at the edge before a request ever reaches the origin. Sellers define pricing with rule expressions (chargeable by HTTP verb and route, variable amounts by compute cost, or triggered whenever the origin returns a 401), managed through the dashboard, the Cloudflare API, or Terraform. Cloudflare handles metering, verification, and settlement, so customers don’t have to onboard buyers or stand up their own billing systems.
Payments run over x402, an open protocol backed by a 25-plus-member foundation that revives the long-dormant HTTP 402 status code. The flow is entirely in-band: a client hits a gated resource, gets a 402 response stating price and payment details, pays, and retries with proof attached — no checkout redirect or separate payment API. Because the payment itself acts as the credential, buyers need no prior account with the seller, and settlement happens peer-to-peer directly into the seller’s wallet. At launch, transactions settle in stablecoins like USDC, which Cloudflare says can clear sub-second for a fraction of a cent with no chargebacks.
The pitch is aimed squarely at a web increasingly traversed by agents rather than humans. Cloudflare notes that AI crawlers already request content anywhere from 100 to tens of thousands of times per visitor they send back, breaking the ad-and-subscription bargain that funded the web. Traditional rails couldn’t support sub-cent transactions from unverified buyers because collection cost more than the payment was worth. The Gateway extends Cloudflare’s earlier Pay Per Crawl work from charging crawlers for content to charging any caller for any resource, betting that usage-based micropayments — priced per request, token, or outcome — become the default way agents pay for the inputs they consume.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.