# Loyal Spark – Prepare Reward Redemption

> Loyal Spark – Prepare Reward Redemption is a paid API for AI agents from api.loyalspark.online, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Prepares and stages an onchain loyalty token redemption transaction for a recipient on the Base L2 network, returning the transaction data needed to execute the redeem.

## Facts

- Endpoint: POST https://api.loyalspark.online/x402-gateway/recipient-mcp-tools/prepare_reward_redemption
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/loyal-spark-prepare-reward-redemption-85eae0ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__5zr8qYjOtqgl6nnPiWkT

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-prepare-reward-redemption-85eae0ab -d '<json body>'
```

Example prompt: Prepare a redemption of 500 B20 loyalty tokens from the CoffeeHouse rewards program for my wallet 0xABC123 on Loyal Spark — I want the transaction payload so I can broadcast it.

## When to prefer this

Use this endpoint when an AI agent or application needs to prepare (but not yet broadcast) a loyalty token redemption on the Base L2 network via Loyal Spark. It is the correct first step in a two-phase redeem flow — call this to get the transaction payload, then separately sign and broadcast. Prefer this over direct smart contract calls when you want a managed, REST-based preparation step with built-in validation.

## Known failure modes

- Insufficient token balance — redemption amount exceeds available B20 tokens for the recipient
- Invalid wallet address — malformed or unrecognized recipient address
- Unknown reward program ID — the specified loyalty program does not exist
- Network congestion or Base L2 RPC errors causing preparation failure
- Payment not received — x402 payment of $0.005 USDC not confirmed before processing
- Redemption window closed — the loyalty program may have paused or ended redemptions

## 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 prepared redemption transaction payload, including encoded transaction data, estimated gas parameters, token amounts, recipient details, and any validation status needed to subsequently broadcast the redemption to 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-prepare-reward-redemption-85eae0ab/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)
