# ScanPay Token Balance

> ScanPay Token Balance is a paid API for AI agents from scanpay-edge.alextaghiashvili.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-01).

Returns the ERC-20 token balance of any EVM wallet address on Base or Ethereum via direct eth_call, no indexer or API key required.

## Facts

- Endpoint: GET https://scanpay-edge.alextaghiashvili.workers.dev/api/v1/token-balance?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/scanpay-token-balance-4f94dbde
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0gWhYTjG0hq96mWZyohDw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability scanpay-token-balance-4f94dbde
```

Example prompt: What's the USDC balance of wallet 0x1E04...efc9 on Base — give me both the raw and human-readable amounts?

## When to prefer this

Choose this endpoint when you need a lightweight, no-API-key ERC-20 balance lookup on Base or Ethereum via direct eth_call. Prefer it over indexer-based solutions when you want trustless on-chain data without third-party rate limits. Use the batch sibling endpoint when checking multiple wallet/token pairs at once.

## Known failure modes

- Invalid or malformed wallet address returns an error
- Invalid token contract address (not a valid ERC-20) may return zero or error
- Unsupported network (not Base or Ethereum) returns an error
- RPC node downtime causes timeout or 5xx response
- Missing required query parameters returns a 4xx validation error

## How this service works

Pay-per-call x402 APIs for AI agents: OpenAI-compatible LLM chat, perp funding and arbitrage spreads, crypto prices, gas, FX, Solana SPL mint audit, token price by contract, x402 delivery-receipt verification, web search, clean page extraction, batch tools and deterministic code-security scanning. USDC on Base or Solana, no signup, no API key, from $0.0001 a call.

## Output

Returns a JSON object containing the wallet address, token contract address, network, token decimals, the raw integer balance (balance_raw), a decimal-formatted string (balance_str), and a numeric balance value — all sourced directly from an on-chain eth_call with no third-party indexer.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address",
      "token"
     ],
     "properties": {
      "token": {
       "type": "string"
      },
      "address": {
       "type": "string"
      },
      "network": {
       "enum": [
        "base",
        "ethereum"
       ],
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "token": "0x8335…2913",
  "address": "0x1E04…efc9",
  "balance": 1,
  "network": "base",
  "decimals": 6,
  "balance_raw": "1000000",
  "balance_str": "1.000000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/scanpay-token-balance-4f94dbde/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scanpay-edge.alextaghiashvili.workers.dev](https://www.zero.xyz/host/scanpay-edge.alextaghiashvili.workers.dev/llms.txt)
