Prerequisites
- A wallet on any of 11 supported EVM chains (Ethereum, Base, Arbitrum, Optimism, etc.)
- USDC deposited via Circle Gateway
x402-fetch(Node) orx402-requests(Python) installed
TypeScript example
wrapFetchWithPayment automatically signs, retries, and returns the data.
Python example
Cost math
How much will it actually cost?Troubleshooting
`Insufficient USDC balance`
`Insufficient USDC balance`
Top up via Circle Gateway. The error response includes the exact amount needed.
`Unsupported chain`
`Unsupported chain`
Nanopayment supports 11 EVM chains. Check your wallet client is on Base, Ethereum, Arbitrum, Optimism, Polygon, or another supported chain.
`Signature invalid`
`Signature invalid`
Make sure your wallet client uses the same account that holds the USDC. EIP-3009 requires the signer == token holder.

