# Loyal Spark - Use Voucher

> Loyal Spark - Use Voucher 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).

Redeems a loyalty voucher on the Loyal Spark onchain rewards protocol running on Base L2

## Facts

- Endpoint: POST https://api.loyalspark.online/x402-gateway/mcp-tools/use_voucher
- 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-use-voucher-a8cd7be4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V1_zYeRZZNjrVwz8fswha

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-use-voucher-a8cd7be4 -d '<json body>'
```

Example prompt: Redeem my Loyal Spark voucher — the voucher ID is VOUCHER-ABC123 — and apply it to my wallet 0xABCDEF1234567890 to get the associated ERC-20 reward tokens on Base.

## When to prefer this

Use this endpoint when a user wants to redeem or consume a specific loyalty voucher on the Loyal Spark protocol on Base L2, converting a voucher code into onchain ERC-20 reward tokens. Prefer this over 'earn' or 'trade' endpoints when the user has an existing voucher to apply rather than wanting to earn new rewards or swap tokens.

## Known failure modes

- Voucher already redeemed — returns error indicating voucher has been consumed
- Invalid voucher ID — returns 400 or similar error
- Wallet address not eligible for this voucher
- Insufficient payment of $0.01 USDC via x402 causes request rejection
- Onchain transaction failure due to Base L2 network congestion
- Voucher expired — returns error indicating expiry

## 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 response confirming the voucher redemption, including transaction hash on Base L2, updated token balance, and voucher status (e.g. redeemed/consumed). May also include the amount of ERC-20 reward tokens credited to the wallet.

## Example request

```json
{
 "id": 1,
 "method": "tools/call",
 "params": {
  "name": "get_platform_info",
  "arguments": {}
 },
 "jsonrpc": "2.0"
}
```

## 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-use-voucher-a8cd7be4/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)
