{
  "id": "x402.client",
  "protocol": "x402",
  "layer": "payment",
  "role": "agent-developer",
  "status": "optional",
  "title": "Handle HTTP 402 in the agent client",
  "description": "Buyer clients pay and retry on 402. Cloudflare's withX402Client wraps MCP connections with automatic 402 handling and optional human approval.",
  "goal": "Your agent can buy access to paid APIs and tools.",
  "note": "",
  "how_to_implement": {
    "steps": [
      "Use an x402 client SDK or withX402Client from the Agents SDK.",
      "Add a spending confirmation step for users."
    ]
  },
  "resources": [
    {
      "label": "x402 on GitHub",
      "url": "https://github.com/x402-foundation/x402",
      "type": "spec",
      "publisher": "x402 Foundation"
    },
    {
      "label": "Cloudflare: pay from the Agents SDK with x402",
      "url": "https://developers.cloudflare.com/agents/tools/payments/x402/pay-from-agents-sdk/",
      "type": "docs",
      "publisher": "Cloudflare"
    }
  ],
  "audit": {
    "method": "code_review",
    "automatable": false,
    "human": "Client completes a paid request on testnet."
  },
  "how_to_verify": "Client completes a paid request on testnet.",
  "artifacts": [
    "x402 client"
  ],
  "depends_on": [
    "x402.middleware"
  ],
  "status_note": "",
  "verified": true,
  "slug": "x402-client",
  "category": "payment",
  "url": "https://vreeman.ai/commerce/checklist#x402.client",
  "updated": "2026-10-19",
  "sources": [
    {
      "label": "x402 on GitHub",
      "url": "https://github.com/x402-foundation/x402",
      "type": "spec",
      "publisher": "x402 Foundation"
    },
    {
      "label": "Cloudflare: pay from the Agents SDK with x402",
      "url": "https://developers.cloudflare.com/agents/tools/payments/x402/pay-from-agents-sdk/",
      "type": "docs",
      "publisher": "Cloudflare"
    }
  ],
  "related_slugs": [
    "x402-middleware"
  ]
}