# ERC-20 Token Allowance Checker

> ERC-20 Token Allowance Checker is a paid API for AI agents from x402-gateway-production-1f21.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Queries the current ERC-20 token allowance granted by an owner address to a spender address on a given blockchain network

## Facts

- Endpoint: POST https://x402-gateway-production-1f21.up.railway.app/chain/erc20-allowance?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-token-allowance-checker-39a3432f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_j9yemb_D_t1r4QYjo1O6a

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 erc-20-token-allowance-checker-39a3432f -d '<json body>'
```

Example prompt: Check how much USDC the Uniswap v3 router (0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45) is approved to spend on behalf of my wallet (0xAbCd1234...5678) on the Base network using the USDC contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.

## When to prefer this

Use this endpoint when you need a machine-payable, on-demand ERC-20 allowance lookup without managing your own blockchain RPC infrastructure. Prefer this over self-hosted solutions when operating in an agent pipeline that already uses x402 micropayments. Ideal for Base or Ethereum mainnet queries at $0.001 per call, making it cost-effective for occasional or high-frequency checks.

## Known failure modes

- Invalid Ethereum address format for owner, spender, or contract returns a validation error
- Unsupported network value (only 'base' or 'ethereum' are accepted) returns an enum validation error
- Non-existent or non-ERC-20 contract address may return zero or an RPC error
- Network RPC unavailability causes a timeout or 5xx error
- Missing required fields (owner, spender, contract) returns a 400 bad request
- Payment not included or insufficient USDC causes x402 payment-required rejection

## How this service works

Machine-payable x402 utilities for hashing, Base64, UUID generation, unit and timezone conversion, realtime crypto market data, webpage/document extraction, URL-to-Markdown, metadata, RAG ingestion and deterministic website change detection.

## Output

Returns a JSON object indicating the current allowance amount (in token base units) that the spender address is authorized to transfer on behalf of the owner address for the specified ERC-20 contract, along with a status field confirming the query completed successfully.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "owner",
      "spender",
      "contract"
     ],
     "properties": {
      "owner": {
       "type": "string"
      },
      "network": {
       "enum": [
        "base",
        "ethereum"
       ],
       "type": "string",
       "default": "base"
      },
      "spender": {
       "type": "string"
      },
      "contract": {
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "status": "ready"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-allowance-checker-39a3432f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-gateway-production-1f21.up.railway.app](https://www.zero.xyz/host/x402-gateway-production-1f21.up.railway.app/llms.txt)
