Hacker NewsThursday · July 2, 2026FREE

Monetization Gateway: Charge for any resource behind Cloudflare via x402

cloudflaremonetizationx402workerspay-per-use

Cloudflare has introduced the Monetization Gateway, a new feature that lets developers charge for any resource behind Cloudflare via the x402 protocol. Announced on July 1, 2026, the gateway allows pay-per-use access to APIs, AI models, or content without requiring upfront subscriptions. It integrates with Cloudflare Workers and handles payment processing, enabling developers to monetize digital assets directly at the edge. The x402 protocol is a proposed standard for HTTP 402 Payment Required responses, and Cloudflare's implementation provides a seamless way to implement pay-per-request billing. This could simplify revenue generation for developers offering APIs or AI services, as it removes the need for custom payment infrastructure. The announcement highlights that the gateway works with any resource behind Cloudflare, including Workers, Pages, and R2 storage. Cloudflare also noted that the gateway supports multiple payment methods and currencies, though specific details on pricing or fees were not provided in the excerpt. The feature is designed to be easy to set up, with developers needing only to add a few lines of code to their Workers to enable charging. This move positions Cloudflare as a platform not just for performance and security but also for monetization, potentially changing how developers think about building and selling digital products.

// why it matters

Developers can now monetize APIs and content directly at the edge without building custom payment infrastructure.

Sources

Primary · Hacker News
▸ Read original at blog.cloudflare.com

Like this? Get the next digest.