Skip to main content

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.
WhoGas Cost
User (Payer)$0 - only signs messages
API Provider$0 - facilitator covers everything
Facilitator~$0.01-0.05 per payment (covered by facilitator)
This is one of the main benefits of x402 - users never need ETH for gas.

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.0001USDC(1/100thofacent).However,werecommend0.0001 USDC (1/100th of a cent). However, we recommend 0.001+ for practical pricing.

Tokens & Networks

What tokens can users pay with?

With the escrow scheme, users can pay with:
TokenAddress (Base Mainnet)
USDC0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
WETH0x4200000000000000000000000000000000000006
DAI0x50c5725949a6f0c72e6c4a641f24049a917db0cb
USDT0xfde4c96c8593536e31f229ea8f37b2ada2699bb2
With the exact scheme, only USDC is supported.

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?

NetworkChain IDStatus
Base Mainnet8453✅ Live
Base Sepolia84532✅ 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:
  1. New payments cannot be processed
  2. API providers can implement fallback logic (serve for free, use cached responses, etc.)
server.onError(async (ctx, error) => {
  if (error.status === 503) {
    // Facilitator down - decide how to handle
    console.log('Facilitator unavailable');
  }
});

What if I accidentally double-charge a user?

Impossible by design. Each request includes a unique requestId. 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)
See our React example for integration patterns.

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:
  1. Get your API key from facilitator.agentokratia.com (same key works on all networks)
  2. Get testnet USDC from Circle Faucet
  3. Configure your app for Sepolia:
import { baseSepolia } from 'viem/chains';

const walletClient = createWalletClient({
  chain: baseSepolia,
  transport: http(),
});

Payments

How does multi-token payment work?

  1. Server calls buildAccepts() to get DEX quotes for each supported token
  2. Client receives payment options (USDC, WETH, DAI, USDT)
  3. Client picks a token (manually or via createBalanceSelector)
  4. Client signs Permit2 (for non-USDC) or ERC-3009 (for USDC)
  5. 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
Slippage is typically ~0.5% and is factored into the quote.

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 tokens
  • quote_expired - Swap quote expired, retry with fresh quote
  • signature_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:
try {
  const response = await paidFetch(url);
} catch (err) {
  if (err.message?.includes('User rejected')) {
    showToast('Transaction cancelled');
    return;
  }
  throw err;
}

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

Still Have Questions?