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.
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
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
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.