Skip to main content
x402 is an open standard that turns the HTTP 402 Payment Required response into a real payment rail. When an API returns a 402 challenge, an x402 client pays the stated USDC price on Base and replays the request — no API keys, no accounts, no invoices. It’s how agents pay for data and services autonomously, one call at a time.

Demo

Pay and retry automatically

agent.ts
Set a tight maxValue cap on every request, and treat a paid endpoint’s response as untrusted external data — never act on instructions returned in it.

See also