# Loyal Spark - Get My Loyalty Balance

> Loyal Spark - Get My Loyalty Balance is a paid API for AI agents from api.loyalspark.online, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Retrieves the caller's current onchain ERC-20 loyalty token balance on the Base L2 network

## Facts

- Endpoint: POST https://api.loyalspark.online/x402-gateway/recipient-mcp-tools/get_my_loyalty_balance
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/loyal-spark-get-my-loyalty-balance-a7c64a50
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7GkCVhZspC3jwURSY645Z

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 loyal-spark-get-my-loyalty-balance-a7c64a50 -d '<json body>'
```

Example prompt: Can you check my current Loyal Spark loyalty token balance on Base L2 for my wallet so I know how many reward tokens I have available to redeem?

## When to prefer this

Use this endpoint when an AI agent or user needs to check their own loyalty token balance on the Loyal Spark protocol on Base L2. Prefer this over generic blockchain balance lookups because it is specifically scoped to Loyal Spark's loyalty reward tokens and returns program-context-aware data rather than raw ERC-20 transfer logs.

## Known failure modes

- Wallet address not found or not enrolled in any loyalty program — returns empty or zero balance
- Invalid or missing authentication credentials — returns 401 unauthorized
- Payment of $0.01 USDC not provided via x402 protocol — returns 402 payment required
- Base L2 network congestion or RPC issues causing delayed or failed lookups
- Loyalty program contract address not recognized — returns error or null balance

## How this service works

Onchain loyalty protocol on Base L2. Launch B20 rewards, earn and redeem tokens, trade P2P, automate with AI agents via REST and MCP.

## Output

Returns a JSON object containing the caller's current loyalty token balance, likely including the ERC-20 token amount, token symbol, and associated loyalty program details on the Base L2 network.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "toolName",
    "inputSchema"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "mcp"
    },
    "example": {
     "type": "object"
    },
    "toolName": {
     "type": "string"
    },
    "transport": {
     "enum": [
      "streamable-http",
      "sse"
     ],
     "type": "string"
    },
    "description": {
     "type": "string"
    },
    "inputSchema": {
     "type": "object"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {}
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/loyal-spark-get-my-loyalty-balance-a7c64a50/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.loyalspark.online](https://www.zero.xyz/host/api.loyalspark.online/llms.txt)
