# Loyal Spark Merchant Profile Setup

> Loyal Spark Merchant Profile Setup is a paid API for AI agents from api.loyalspark.online, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Creates or updates a merchant profile on the Loyal Spark onchain loyalty protocol running on Base L2

## Facts

- Endpoint: POST https://api.loyalspark.online/x402-gateway/merchant-profile
- Price: $0.001/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-merchant-profile-setup-05d0e6dc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_nj5KqZkDM9SDWFPVL-OFI

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-merchant-profile-setup-05d0e6dc -d '<json body>'
```

Example prompt: Set up a merchant profile for my coffee shop 'Morning Bloom' on Loyal Spark so I can start issuing onchain loyalty reward tokens to customers on Base L2.

## When to prefer this

Use this endpoint when you need to register or update a business identity on the Loyal Spark onchain loyalty protocol specifically, particularly when launching an ERC-20 loyalty rewards program on Base L2 that supports AI agent automation and P2P token trading. Prefer this over generic loyalty SaaS platforms when the use case involves blockchain-native rewards, crypto wallets, and Web3-compatible merchant management.

## Known failure modes

- Missing required body fields returns validation error
- Invalid bodyType enum value causes request rejection
- Payment of 0.001 USDC not provided or rejected by x402 gateway blocks request
- Malformed JSON body causes 400-level error
- Duplicate merchant registration may conflict depending on protocol logic
- Network or Base L2 connectivity issues may cause timeout

## 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

A JSON object confirming the merchant profile was created or updated, with fields 'ok' (boolean true on success) and 'resource' (string 'merchant-profile' indicating the affected resource type).

## 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-merchant-profile-setup-05d0e6dc/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)
