Back to blog
x402protocolfundamentals

What is x402? The HTTP 402 standard powering agent payments

5 min read

For decades, one HTTP status code sat reserved and unused: 402 Payment Required. The authors of the HTTP spec set it aside for a future where paying for a resource would be as native to the web as returning a 404 for a missing one — then left it blank. x402 is the open protocol that finally fills that gap, and it arrives exactly when the web needs it: as autonomous AI agents start transacting on their own.

The problem x402 solves

The web's payment layer was built for humans. You land on a page, reach for a card, type a number, solve a checkout flow, maybe create an account. None of that works for an autonomous agent making thousands of small requests across dozens of services. Agents don't have credit cards, they don't want annual subscriptions to APIs they'll hit twice, and they can't pause to sign up for every paywalled resource they encounter.

What agents need is pay-per-request: hit a URL, get told the price, pay it, get the resource — in one machine-readable loop, with no human in the middle.

How the x402 flow works

x402 layers a payment handshake directly onto ordinary HTTP. The flow looks like this:

  1. A client (say, an AI agent) makes a normal request to a protected resource.
  2. The server responds with HTTP 402 Payment Required and a machine-readable challenge: the price, the accepted asset (commonly a stablecoin like USDC), the network, and where to send payment.
  3. The client pays on-chain from its own wallet and retries the request with proof of payment attached.
  4. The server verifies the payment and returns 200 OK with the resource.

Because the whole exchange rides on standard HTTP status codes and headers, any client that can speak HTTP can speak x402 — no SDK lock-in, no proprietary checkout, no account.

Why stablecoins and on-chain settlement

x402 leans on stablecoins (USDC is the common default today) settling on fast, low-fee networks. That combination is what makes micro-priced, per-request payments viable: settlement is near instant, fees are tiny fractions of a cent, and value moves without a card network, an invoice, or a monthly bill. For an agent paying a tenth of a cent to read one page, nothing else clears fast or cheap enough.

The two sides of x402

It helps to see x402 as having two sides:

  • The sell side — websites, APIs, and content owners that want to charge agents per request. Gateways from infrastructure providers increasingly make it a few lines of config to return 402 challenges and collect payment. This is where most of the early tooling landed.
  • The buy side — the agents (and the teams running them) that are paying. This side has been comparatively neglected, yet it's where the money leaves your wallet. Someone has to see what agents pay, debug failed payments, and keep spend under control.

402.report is built for that buy side — the independent, non-custodial control plane for the teams whose agents are doing the paying. (Related reading: how autonomous AI agents pay for things and non-custodial spend tracking for AI agents.)

Why this matters now

As agentic workflows move from demos to production, they stop being free. Every retrieval, every tool call, every premium API hit can carry a price. x402 is the standard making that priced web machine-navigable — and the reason "agent payments," "agentic payments," and "x402" are moving from niche to mainstream vocabulary fast.

If you're running agents that pay with x402, you'll want visibility into it before the bill surprises you. Join the 402.report waitlist to get early access.