AI Agents Get a Cash Rail: x402 and the Bot-to-Bot Economy
A dormant web status code just woke up. With x402, AI agents can pay in stablecoins inside standard HTTP 402 flows, unlocking pay-per-API, streaming compute, and machine commerce. See how it works, what changes next, and how to ship today.

Overview: x402 turns HTTP 402 into a native stablecoin payment rail for AI agents. It weaves payments into standard HTTP request flows, enabling pay-per-call, streaming compute, and data vending, all within a single conversation between client and server. The guide outlines how x402 works, practical patterns (fixed-price per call, streaming with settlements, deferred batch settlement, and hybrid permissioning), a builder’s checklist to ship, risks (agent exploits, 402 spam, replay, settlement trust, compliance, key management), and rollout signals. It also describes a practical architecture and measurement guidance for AI builders. The piece emphasizes keeping HTTP as truth, abstracting blockchains, and a path to market via small, boring integrations that allow agents to pay with microtransactions.








