Skip to main content

Payments

Pay for API calls using USDC on Base Sepolia via the x402 protocol.

Requirements

  • Wallet - MetaMask, Coinbase Wallet, or WalletConnect-compatible
  • Test USDC - On Base Sepolia testnet
No ETH needed! x402 uses ERC-3009 gasless signatures - you only need USDC. The facilitator pays all gas costs.

Getting Testnet USDC

Circle USDC Faucet

Get free test USDC on Base Sepolia
Add Base Sepolia to your wallet: Chain ID 84532, RPC https://sepolia.base.org

Pay-Per-Call

Sign each request individually. Best for testing and occasional use. Pros: No upfront commitment, pay exactly what you use Cons: Wallet popup every request, higher gas costs

Pre-paid Sessions

Deposit USDC once, make unlimited calls until balance depletes. Pros: One signature for many calls, lower gas, faster Cons: Upfront deposit, 1-hour expiry

How Sessions Work

  1. Deposit - Choose amount, sign once
  2. Call - Each request deducts from balance automatically
  3. Reclaim - Get unused balance back after expiry
At 0.05/call,a0.05/call, a 10 deposit enables ~200 calls.

Cost Comparison

For 100 calls at $0.05 each:
MethodGas CostTotal
Pay-Per-Call~$1.00~$6.00
Pre-paid Session~$0.02~$5.02

Security

  • Non-custodial - You control your wallet
  • Bounded exposure - Sessions limit max loss to deposit
  • Transparent - All transactions verifiable on Base

Troubleshooting

Check Base Sepolia Explorer for status.
Get test tokens from the faucets above. Check you’re on Base Sepolia (Chain ID 84532).
Sessions last 1 hour. Create a new one. Reclaim unused balance.

Next Steps