Token Kiosk
API Reference

Top Up

Fund wallet balance via x402 stablecoin payment.

POST /v1/topup

Fund wallet balance via x402 stablecoin payment. USDC (ERC-3009) and USDT (Permit2) are accepted on Base and Arbitrum. Two-step flow.

Step 1: Get payment requirements

curl -X POST https://agent-router.gaib.ai/v1/topup \
  -H "Content-Type: application/json" \
  -d '{"amount": 5}'
{
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "5000000",
      "maxAmountRequired": "5000000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0x...",
      "extra": { "assetTransferMethod": "eip3009", "name": "USD Coin", "version": "2" }
    },
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "5000000",
      "maxAmountRequired": "5000000",
      "asset": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
      "payTo": "0x...",
      "extra": { "assetTransferMethod": "permit2" }
    }
  ]
}

Always use the accepts array from the live 402 response as the source of truth — the offered assets, networks, and transfer methods can vary by deployment.

Step 2: Send with payment signature

curl -X POST https://agent-router.gaib.ai/v1/topup \
  -H "Content-Type: application/json" \
  -H "X-Payment: <base64-encoded-signature>" \
  -d '{"amount": 5}'
{
  "balance_usdc": 5000000,
  "credited_usdc": 5000000
}
FieldTypeDescription
amountnumberUSD amount, minimum $1

On this page