x402 and HTTP 402 for AI Agents

HTTP 402 Payment Required is a long-reserved status code that lets a server ask a client to pay before it serves a response; x402 is the modern convention that puts it to work for machine payments. For agents it matters because it makes payment a native part of an HTTP request rather than a separate checkout flow — an agent calls an endpoint, receives a 402 with payment terms, pays programmatically, and retries. Pay-per-call becomes a protocol, not an integration.

HTTP 402
Payment Required — long reserved, now used
x402
A convention for machine payments over HTTP
Enables
Pay-per-call APIs, micropayments
Pairs with
Stablecoins, agent wallets

Why HTTP payments matter again

For agents, the payment and the request want to be one flow. A 402 with machine-readable terms lets an agent handle payment the way it handles any other response code — no browser, no form, no human at a terminal. That is what makes pay-per-call and micropayments practical between machines.

x402 is one of several approaches; AP2 and others address adjacent parts of the agent-payment problem. A neutral comparison of them matters more than betting the stack on one, which is why the estate treats payment protocols as composable rather than as a single choice.

Related standards

x402 / HTTP 402AP2

Questions

Is x402 a blockchain?

No. It is a way to use HTTP’s payment-required status for machine payments. It can settle in stablecoins or other rails, but the convention itself is HTTP-native.

How is x402 different from a normal payment API?

A payment API is a separate service an integration calls; x402 makes payment part of the resource request itself, so an agent needs no bespoke checkout flow.

Keep reading

related
How Do Autonomous Agents Pay?
related
What Is an AI Agent Wallet?
related
MCP vs A2A: What Is the Difference?
related
x402 vs AP2: Agent Payment Protocols Compared
referenced by
What Is Machine-to-Machine Commerce?
referenced by
Why Stablecoins Fit AI Agent Payments
referenced by
What Is AP2 (Agent Payments Protocol)?
referenced by
Micropayments for AI Agents
Payments & Economic Agency
What Is Agentic Commerce?
Payments & Economic Agency
What Is an Agent Marketplace?
Payments & Economic Agency
How Do AI Agents Negotiate Terms and Price?
Payments & Economic Agency
Machine-Readable Invoices and Cryptographic Receipts for Agents
Payments & Economic Agency
What Is Agent Escrow?

By Michael Gord · published 2026-09-27 · part of the Agentic Encyclopedia. Dates are the day of publication; events are cited at their own dates.