Onchain Chronicles

defi ·

What Is x402? How AI Agents Pay With Crypto

Coinbase's x402 protocol puts the web's long-unused 402 code to work so AI agents and apps can pay for APIs and data in stablecoins like USDC.

Decrypt

Nobody really built the web with payments in mind. Early HTTP specifications included a status code, 402 "Payment Required", that was reserved for a future system of online payments. Then it sat unused for about 30 years.

Payments were slow and expensive, and they needed accounts, card details and middlemen who could reverse charges. None of that works for a small payment made by software. That gap matters more now because AI agents are starting to browse, call APIs and buy services for their users.

An agent can't fill in a checkout form or sign up for a monthly plan for every tool it uses. Cloudflare says more than half of internet traffic is now non-human, and it reports seeing a billion HTTP 402 responses on its network every day. x402 is an attempt to finally give the internet a native way to pay. This guide covers what it is, how it works, who backs it, and whether there's a token involved. The 402 "Payment Required" code has been in the HTTP standard since the 1990s.

Earlier coverage

defiexchange

Related coverage

Back to the ledger

24