A 402 response turns a paywall into an API: instead of a human-oriented checkout page, the server returns machine-readable payment terms; the client (often an AI agent) pays and retries. x402 standardizes this exchange — in its HTTP transport, payment terms and proofs travel in headers such as PAYMENT-REQUIRED, PAYMENT-SIGNATURE and PAYMENT-RESPONSE.
The code went from curiosity to infrastructure fast: Cloudflare's Pay Per Crawl answers unpaid AI crawlers with 402s at network scale, and its Monetization Gateway extends the same model to APIs, datasets and MCP tools.
It was explicitly "reserved for future use" — there was no standard way for a machine to pay. Programmatic stablecoin payments and AI agents that need to buy access finally supplied both the rails and the demand.