Frequently Asked Questions
Quick answers to common questions about x402 payments.Costs & Fees
How much gas does this cost?
Users pay $0 in gas. The system uses ERC-3009 and Permit2 signatures, which are completely gasless for users.| Who | Gas Cost |
|---|---|
| User (Payer) | $0 - only signs messages |
| API Provider | $0 - facilitator covers everything |
| Facilitator | ~$0.01-0.05 per payment (covered by facilitator) |
Is there a fee on top of payments?
All fees are currently sponsored by Agentokratia. We cover gas costs and charge no platform fee. Any future fee changes will be announced well in advance.What’s the minimum I can charge per request?
Technically 0.001+ for practical pricing.Tokens & Networks
What tokens can users pay with?
With the escrow scheme, users can pay with:| Token | Address (Base Mainnet) |
|---|---|
| USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| WETH | 0x4200000000000000000000000000000000000006 |
| DAI | 0x50c5725949a6f0c72e6c4a641f24049a917db0cb |
| USDT | 0xfde4c96c8593536e31f229ea8f37b2ada2699bb2 |
What token do I receive as an API provider?
Always USDC. Even if users pay with WETH or DAI, the facilitator automatically swaps it to USDC before paying you.Which networks are supported?
| Network | Chain ID | Status |
|---|---|---|
| Base Mainnet | 8453 | ✅ Live |
| Base Sepolia | 84532 | ✅ Live (Testnet) |
Can I use this on Ethereum mainnet?
Not currently. Ethereum mainnet gas costs would make small payments impractical. Base offers the same security with ~100x lower fees.Security & Reliability
What if the facilitator goes down?
If the facilitator is unavailable:- New payments cannot be processed
- API providers can implement fallback logic (serve for free, use cached responses, etc.)
What if I accidentally double-charge a user?
Impossible by design. Each request includes a uniquerequestId. The facilitator enforces idempotency - the same signature can only be settled once.
Can users dispute or chargeback payments?
No chargebacks. Unlike credit cards, cryptocurrency payments are final. The signature serves as cryptographic proof that the user authorized the payment. This is actually a benefit for API providers - no chargeback fraud risk.Integration
Do I need an API key?
Servers: Yes, to authenticate with the facilitator for verification and settlement. Clients: No, clients just need a wallet to sign payments. Get your API key at facilitator.agentokratia.com.Does this work with React/Next.js/Vue/etc?
Yes! The SDK is framework-agnostic. It works with any JavaScript environment that has:- A wallet connection (viem WalletClient)
- Fetch API (or polyfill)
Can I use this server-side (Node.js)?
For protecting APIs: Yes, the server SDK works in any Node.js environment. For making payments as a client: Yes, with a private key. Be careful about key security.How do I test without real money?
Use Base Sepolia testnet:- Get your API key from facilitator.agentokratia.com (same key works on all networks)
- Get testnet USDC from Circle Faucet
- Configure your app for Sepolia:
Payments
How does multi-token payment work?
- Server calls
buildAccepts()to get DEX quotes for each supported token - Client receives payment options (USDC, WETH, DAI, USDT)
- Client picks a token (manually or via
createBalanceSelector) - Client signs Permit2 (for non-USDC) or ERC-3009 (for USDC)
- Facilitator executes swap and pays receiver in USDC
What if the swap price changes?
Quotes have a short validity window (typically 60 seconds). If a quote expires:- The payment will fail with
quote_expired - The client SDK will automatically retry with fresh quotes
What happens if a payment fails?
No funds are transferred. The user keeps their tokens and can retry. Common failure reasons:insufficient_balance- User doesn’t have enough tokensquote_expired- Swap quote expired, retry with fresh quotesignature_invalid- Signature verification failed
Troubleshooting
Why am I getting “User rejected” errors?
The user clicked “Reject” in their wallet’s signature prompt. Handle it gracefully:How do I debug payment issues?
Check the server logs and facilitator response. Common issues:- Missing or invalid API key (401)
- Wrong network configured
- Insufficient token balance