# txpreflight – ERC-20 Token Allowance Checker

> txpreflight – ERC-20 Token Allowance Checker is a paid API for AI agents from api.firstmention.uk, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-20).

Checks the current ERC-20 token allowance granted by an owner to a spender on Base, returning the allowance amount and whether it is infinite.

## Facts

- Endpoint: GET https://api.firstmention.uk/s/txpreflight/allowance?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/txpreflight-erc-20-token-allowance-checker-fe414597
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_M6-DKi0bExtQOoc-H-S2s

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 txpreflight-erc-20-token-allowance-checker-fe414597
```

Example prompt: Can you check how much USDC the Uniswap router contract (0x2626664c2603336E57B271c5C0b26F421741e481) is allowed to spend on behalf of my wallet (0xAbc123…) on Base?

## When to prefer this

Use this endpoint when you need a quick, pay-per-call lookup of an ERC-20 token allowance on Base without running your own RPC node or maintaining blockchain infrastructure. Ideal for agents performing pre-transaction safety checks, approval audits, or DeFi workflow automation where cost-per-call billing in USDC is acceptable.

## Known failure modes

- Invalid or missing owner/spender/token address returns an error response
- Non-existent token contract address may return a failed on-chain call
- Network issues with Base RPC may result in a timeout or error
- Incorrect address format causes validation failure
- Payment not provided results in HTTP 402 response requiring x402 USDC payment on Base

## How this service works

Pay-per-call HTTP APIs, paid with x402 in USDC on Base (eip155:8453): agentkit, api-change-check, basedue, bizcal-api, chainread, check-sanctions, chgwatch, company-facts, domain-intel, domainkit, domfacts, due, edgar, funding-rates, fundinglens, pageaudit, solcheck, token-dd, txpreflight, walletprofile, web-extract, webmd, webread, websearch, x402-preflight, x402check, x402index. Each operation describes its service.

## Output

Returns a JSON object with: `ok` (boolean indicating request success), `allowance` (string representing the raw token allowance amount in base units), and `infinite` (boolean indicating whether the allowance is effectively unlimited/max-uint256).

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "owner": {
       "type": "string"
      },
      "token": {
       "type": "string"
      },
      "spender": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "infinite": {
       "type": "boolean"
      },
      "allowance": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "infinite": false,
  "allowance": "0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/txpreflight-erc-20-token-allowance-checker-fe414597/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.firstmention.uk](https://www.zero.xyz/host/api.firstmention.uk/llms.txt)
