Agentic AI
What is x402?
x402 is a payment protocol built on HTTP status code 402 ("Payment Required"). A server responds 402 with machine-readable payment requirements; the client pays and retries the request with a payment header; the server verifies and releases the resource. It is designed for per-request payments by software rather than people.
HTTP 402 was reserved in the original specification and left unimplemented for decades because there was no payment rail a server could demand and verify without a human in the loop. Stablecoins on public chains supply that rail, which is why the status code has become useful now rather than in 1997.
The design target is machine clients. An AI agent calling a metered API cannot enter card details, and issuing it a long-lived API key with a billing account attached transfers unlimited spending authority to a non-deterministic process. Per-request payment bounds the exposure to the value of a single call.
Being a payment protocol operated by autonomous software, x402 has a threat model that ordinary checkout flows do not — see the entry on agentic payment security.
Related
Definitions are educational and general. Nothing here is financial, legal or tax advice, and regulatory descriptions summarise frameworks that change — check the current rules for your jurisdiction before relying on them.