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