AI Agents That Pay Their Own Way
Watch a live AI agent discover APIs, hit HTTP 402 Payment Required, sign an EIP-3009 authorization off-chain, and settle USDC nanopayments on Arc Testnet — all in seconds.
The x402 Payment Flow
Five steps. Zero UX friction. Every payment settles on-chain.
Agent Requests Data
POST /research — no auth header, no API key.
Server Returns 402
X-PAYMENT-REQUIRED: base64 JSON — price 0.005 USDC, pay_to 0x80Aae4…
Agent Signs Off-Chain
EIP-3009 TransferWithAuthorization — no gas, no blockchain call yet.
Retry With Payment
X-PAYMENT header carries the signed payload — server settles on Arc Testnet.
200 OK + Tx Hash
X-PAYMENT-RESPONSE returns the confirmed on-chain transaction hash.
Everything an Agent Needs to Pay
Batteries-included primitives: budgets, discovery, transparent payments, and real on-chain settlement.
Session Budget Enforcement
Thread-safe atomic check-and-reserve prevents overspending across concurrent requests. Pass budget_usdc='0.10' — the SDK blocks any payment that would exceed it.
Semantic Service Discovery
registry.search('crypto prices') returns ranked results scored by name (+3), tag (+2), description (+1). Ships with built-in services pointing at the live server.
Transparent x402 Interceptor
PaymentClient is a drop-in httpx.AsyncClient. Your agent code never changes — 402s are caught, paid, and retried invisibly by the custom transport layer.
Real Arc Testnet Settlement
Every payment calls transferWithAuthorization on-chain. Verify at explorer.testnet.arc.network. No mock verification — real EIP-3009 signatures, real txs.