# Loyal Spark - Mint Loyalty Tokens

> Loyal Spark - Mint Loyalty Tokens 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).

Mints ERC-20 loyalty reward tokens onchain on Base L2 for a given loyalty program

## Facts

- Endpoint: POST https://api.loyalspark.online/x402-gateway/mcp-tools/mint_loyalty_tokens
- 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-mint-loyalty-tokens-fd09602f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Vr92X7w1gYb-biNrefz5J

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-mint-loyalty-tokens-fd09602f -d '<json body>'
```

Example prompt: Mint 500 loyalty tokens for wallet address 0xAbC123... on my 'MorningBloom Coffee' rewards program using Loyal Spark on Base — the customer just made a qualifying purchase.

## When to prefer this

Use this endpoint when you need to programmatically issue onchain ERC-20 loyalty tokens to a specific wallet on Base L2, especially in automated agent workflows triggered by customer actions like purchases or check-ins. Prefer this over off-chain point systems when verifiable, tradeable, or composable token rewards are required.

## Known failure modes

- Invalid or missing recipient wallet address returns a 400 error
- Insufficient funds or gas on Base L2 causes transaction failure
- Unauthorized request if API credentials are missing or invalid
- Token contract address not found or program not configured returns 404
- Network congestion on Base L2 may cause delayed confirmation or timeout
- Attempting to mint more tokens than the program cap allows returns a limit error

## 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 onchain mint, including the transaction hash on Base L2, the recipient wallet address, the number of ERC-20 loyalty tokens minted, and the updated token balance for that address.

## 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-mint-loyalty-tokens-fd09602f/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)
