Cloudflare revives HTTP 402 for automated AI payments
First defined in the early days of the web as a placeholder status code for digital payments, HTTP Status Code 402 (Payment Required) has remained largely unused in browser protocols. Today, Cloudflare announced a major initiative to revive 402 for the agentic web.
The new Cloudflare Monetization Gateway, built on the open x402 protocol, allows developers to lock down APIs and structured web content behind an automated micropayment firewall.
How x402 Works for Agents
- Agent Request: An autonomous web crawler or LLM agent requests structured data or executing functions from an API.
- 402 Challenge: The server responds with
HTTP 402 Payment Requiredalong with payment instructions (e.g. digital wallets, token balances, or micropayments). - Instant Settlement: The agent's digital wallet settles the micropayment (fractions of a cent) automatically in real time.
- Data Access: The gateway validates the payment and forwards the payload, allowing the agent to complete its workflow.
The Future of Content Monetization
As web traffic increasingly shifts from human browsers to autonomous agents, websites need new frameworks to monetize data extraction. The x402 protocol enables publishers and developers to charge AI companies directly for API endpoints, making web indexing sustainable in the era of artificial intelligence.

