# AgentIndex x402 Wallet Pay-Check

> AgentIndex x402 Wallet Pay-Check is a paid API for AI agents from x402.agentindex.world, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-29).

Checks whether a given EVM wallet address has sufficient USDC balance on Base mainnet to pay for an API call

## Facts

- Endpoint: GET https://x402.agentindex.world/can-pay?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentindex-x402-wallet-pay-check-c8cad081
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6JCkz98dLB2hwpc0NnnbU

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 agentindex-x402-wallet-pay-check-c8cad081
```

Example prompt: Before we make any paid API calls, check if my wallet 0xb3F32bdfe8D07825BC0D7387295aB1D7559BA69d has enough USDC on Base to cover a 0.001 USDC charge.

## When to prefer this

Use this endpoint when an AI agent needs to pre-flight check whether its wallet is funded before attempting a pay-per-call x402 API request on Base mainnet. It is the authoritative balance check for the AgentIndex x402 ecosystem and returns structured data including shortfall amounts, making it ideal for automated agents that need to handle insufficient funds gracefully before attempting a payment flow.

## Known failure modes

- Missing or invalid EVM address returns an error — address must be a valid 0x-prefixed hex string
- If the wallet has zero USDC, can_pay is false with shortfall_usdc equal to the requested amount
- Network unavailability or RPC errors may cause lookup failure
- Malformed address format (non-checksummed or wrong length) may result in a 400 or error response

## How this service works

Check whether a Base wallet holds enough USDC to pay an x402 amount (default $0.001). Returns balance, can_pay, shortfall. The checklist agents run before spending. Try GET /can-pay/sample.

## Output

Returns a JSON object with a can_pay boolean, the wallet's USDC balance (raw and atomic), ETH balance, the network identifier (eip155:8453 for Base mainnet), the amount requested, and a shortfall_usdc value indicating how much more USDC is needed if the wallet cannot pay.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "amount": {
       "type": "number",
       "description": "USDC amount the agent plans to spend (default 0.001)."
      },
      "address": {
       "type": "string",
       "description": "EVM wallet address (0x…) to check on Base mainnet."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "address",
      "usdc",
      "can_pay"
     ],
     "properties": {
      "eth": {
       "type": "object"
      },
      "usdc": {
       "type": "object"
      },
      "address": {
       "type": "string"
      },
      "can_pay": {
       "type": "boolean"
      },
      "network": {
       "type": "string"
      },
      "x402_receipt": {
       "type": "object"
      },
      "shortfall_usdc": {
       "type": "number"
      },
      "amount_requested": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "eth": {
   "balance": 0
  },
  "usdc": {
   "balance": 0,
   "contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "balance_atomic": "0"
  },
  "address": "0xb3F32bdfe8D07825BC0D7387295aB1D7559BA69d",
  "can_pay": false,
  "network": "eip155:8453",
  "shortfall_usdc": 0.001,
  "amount_requested": 0.001
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentindex-x402-wallet-pay-check-c8cad081/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentindex.world](https://www.zero.xyz/host/x402.agentindex.world/llms.txt)
