What a 402 looks like

Agentic Commerce 101: How Agents Buy and Sell — lesson 5 of 20 (EXAMPLE)

GET /api/report → 402 with { price: "0.25", asset: "USDC", network: "base", payTo: "0x…", nonce }. Agent signs a payment, resends with an X-PAYMENT header, gets 200 plus a settlement receipt. No account, no checkout page, no human.

Source: x402 specification

Previous lesson · Next lesson · Course overview · All courses