# Loyal Spark Onchain Loyalty Token Mint

> Loyal Spark Onchain Loyalty Token Mint 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-13).

Mints ERC-20 loyalty reward tokens on Base Network for a business's loyalty program via the x402 gateway

## Facts

- Endpoint: POST https://api.loyalspark.online/x402-gateway/mint
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/loyal-spark-onchain-loyalty-token-mint-b6129864
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sjZl22iO62C7WukQwZ74w

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-onchain-loyalty-token-mint-b6129864 -d '<json body>'
```

Example prompt: Mint some Loyal Spark loyalty reward tokens for customer wallet 0xABC123 on my coffee shop Morning Bloom's program — they just made a $25 purchase and should receive their branded ERC-20 points on Base network.

## When to prefer this

Choose this endpoint when you need to programmatically mint ERC-20 loyalty tokens on Base Network as part of a Loyal Spark rewards program — specifically when automating post-purchase reward issuance for businesses using the Loyal Spark platform. Prefer this over generic NFT mint APIs when the use case is fungible loyalty points tied to a business's branded program on Base L2.

## Known failure modes

- Invalid or missing required body fields (type, method, bodyType, body) returns 400 validation error
- Insufficient USDC payment ($0.01 required) causes x402 payment failure
- Unsupported HTTP method (only POST, PUT, PATCH allowed) returns schema validation error
- Invalid wallet address or business account returns API-level error
- Base Network congestion or RPC failure causes delayed or failed mint
- Malformed JSON body returns parse error

## How this service works

Onchain loyalty platform on Base Network. Businesses launch branded rewards in minutes, customers earn real value with every purchase, and AI agents automate the rest via REST and MCP. Free plan mints up to 1,000 tokens per month; every call is scoped by row-level security to the wallet behind the API key. 16 skill guides at loyalspark.online/.well-known/skills/index.md.

## Output

Returns a JSON response from the Loyal Spark agent-api or recipient-api confirming the token mint, including transaction details, token amount issued, recipient address, and onchain status on Base 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",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object"
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {}
   }
  },
  "inputSchema": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema"
 },
 "description": "JSON from Loyal Spark agent-api or recipient-api. See OpenAPI for response shape."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/loyal-spark-onchain-loyalty-token-mint-b6129864/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)
