Loyal Spark Recipient REST API

Holder REST API (rwk_)

GitHub OpenAPI

Operations 26

GET /x402-gateway/recipient-api/balances List all loyalty balances for the holder #
GET /x402-gateway/recipient-api/balance Get balance for one loyalty token #
GET /x402-gateway/recipient-api/rewards List rewards available to the holder #
GET /x402-gateway/recipient-api/vouchers List vouchers issued to the holder #
GET /x402-gateway/recipient-api/offers List P2P marketplace offers visible to the holder #
POST /x402-gateway/recipient-api/offers Create P2P swap offer #
GET /x402-gateway/recipient-api/workflow/reward-status Autonomous reward redemption status #
POST /x402-gateway/recipient-api/prepare-transfer Prepare B20/ERC-20 transfer calldata #
POST /x402-gateway/recipient-api/redeem-reward Redeem a reward #
POST /x402-gateway/recipient-api/accept-offer Accept a P2P swap offer (two-phase) #
POST /x402-gateway/recipient-api/cancel-offer Cancel own P2P swap offer #
POST /x402-gateway/recipient-api/workflow/prepare-reward-redemption Prepare reward redemption plan + transfer calldata #
GET /recipient-api/me Get recipient agent profile #
GET /recipient-api/balances List all loyalty balances for the holder #
GET /recipient-api/balance Get balance for one loyalty token #
GET /recipient-api/rewards List rewards available to the holder #
GET /recipient-api/vouchers List vouchers issued to the holder #
GET /recipient-api/offers List P2P marketplace offers visible to the holder #
POST /recipient-api/offers Create P2P swap offer #
GET /recipient-api/workflow/reward-status Autonomous reward redemption status #
POST /recipient-api/register Register / refresh the recipient profile #
POST /recipient-api/prepare-transfer Prepare B20/ERC-20 transfer calldata #
POST /recipient-api/redeem-reward Redeem a reward #
POST /recipient-api/accept-offer Accept a P2P swap offer (two-phase) #
POST /recipient-api/cancel-offer Cancel own P2P swap offer #
POST /recipient-api/workflow/prepare-reward-redemption Prepare reward redemption plan + transfer calldata #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/loyalspark-online:loyalspark-online-recipient-rest-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

loyalspark-online-recipient-rest-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Loyal Spark — Onchain Loyalty Protocol on Base Recipient…
  version: 2.2.0
  summary: AI-agent-native loyalty-as-a-service protocol on Base L2 with paid x402 + MPP corridors.
  description: 'Loyal Spark is an onchain loyalty-as-a-service protocol on Base L2. AI agents and merchants can create B20 loyalty programs (legacy ERC-20 optional), mint tokens to customer wallets, manage reward catalogs, trade tokens on a P2P escrow marketplace, redeem rewards for vouchers, and run analytics — all via paid x402 endpoints (USDC on Base) or via standard REST with x-api-key. Coverage: 89 paid operations across 83 paths (x402 corridor). Direct MCP exposes 43 merchant + 20 recipient tools (get_platform_info answers without a key or a payment); paid x402 MCP prices 32 merchant + 16 recipient tools (confirm_mint_fee is lsk_-only settlement, not x402-priced). Builder Code bc_wdmnog7m. Paying $0.01 USDC at POST /x402-gateway/register-agent (when the wallet has no Merchant Store Plan or Paid Agent Plan) issues a full lsk_ key on the Free plan (1 agent, 200 API calls/month, 1,000 mint tokens/month, 1.25% mint fee, all 5 scopes: read, create_program, mint, trade, manage_rewards). A Shopify Store Plan (Starter $39: 1 agent, 1,000 calls/mo, read only; Growth $79 or 45-day store trial: 3 agents, 10,000 calls/mo, read, mint, manage_rewards; Scale $149: 10 agents, 100,000 calls/mo, all 5 scopes) or Paid Agent Plan (Pro $49: 5 agents, 10,000 calls/mo, unlimited mint, 0.5% fee; Enterprise $129: unlimited, 0.25% fee) sets the wallet''s call and scope ceiling. Mint fee is loyalty tokens: 1.25% Free, 0.5% Pro, 0.25% Enterprise. Keyed REST and MCP calls are scoped by Postgres row-level security to the owner wallet behind the lsk_/rwk_ key. On x402 and MPP, every recipient-api route, the merchant GET reads (programs, rewards, balance, customers, vouchers, analytics, merchant-profile, workflow/program-status), the merchant read MCP tools (list_loyalty_programs, list_rewards, get_token_balance, get_program_analytics, export_customers, and similar) and the holder MCP tools accept the payment alone: the paying wallet is the caller (holder on recipient routes, merchant owner on merchant reads). Other routes (mint, create program, create rewards, trade, bazaar tools) need a live lsk_ (merchant) or rwk_ (holder) key on the same request as the payment; a payment without that live key is not charged. Every keyed call and merchant read enforces the wallet''s plan rate and monthly call limits. These routes accept the payment alone; do not send an API key: GET /offers and GET /recipient-api/offers on both gateways, GET /public-programs ($0.001, active programs, same price as GET /programs), POST /x402-gateway/register-agent ($0.01 USDC on Base; when the wallet has no Merchant Store Plan or Paid Agent Plan, issues a full lsk_ key on the Free plan — 1 agent, 200 API calls/month, 1,000 mint tokens/month, 1.25% mint fee, all 5 scopes: read, create_program, mint, trade, manage_rewards; when the wallet belongs to a Merchant Store Plan — Starter $39: 1 agent, 1,000 calls/mo, read only; Growth $79 or 45-day store trial: 3 agents, 10,000 calls/mo, read, mint, manage_rewards; Scale $149: 10 agents, 100,000 calls/mo, all 5 scopes — or a Paid Agent Plan — Pro $49: 5 agents, 10,000 calls/mo, unlimited mint, 0.5% fee; Enterprise $129: unlimited agents/calls/mint, 0.25% fee — the lsk_ key operates strictly within that plan''s call and scope limits; unpaid SIWE registration without a plan returns HTTP 402 error_code payment_required and next_action pay_x402), POST /x402-gateway/mcp-tools/get_platform_info, POST /x402-gateway/mcp-tools/list_marketplace_offers, and POST /x402-gateway/recipient-mcp-tools/list_p2p_offers. 16 agent skill guides (00-15): https://loyalspark.online/.well-known/skills/index.md'
  x-guidance: 'Loyal Spark on Base L2 (chain 8453, USDC native).


    Auth modes:

    • Merchant agents — header x-api-key: lsk_... (or Authorization: Bearer lsk_...). Look first: GET https://api.loyalspark.online/x402-gateway/public-programs ($0.001, active programs, not your own list). Autonomous onboarding: POST https://api.loyalspark.online/x402-gateway/register-agent ($0.01 USDC, no API key; when the wallet has no Merchant Store Plan or Paid Agent Plan, issues a full lsk_ key on the Free plan — 1 agent, 200 API calls/month, 1,000 mint tokens/month, 1.25% mint fee, all 5 scopes: read, create_program, mint, trade, manage_rewards; when the wallet belongs to a Shopify Store Plan — Starter $39: 1 agent, 1,000 calls/month, read only; Growth $79 or 45-day store trial: 3 agents, 10,000 calls/month, read, mint, manage_rewards; Scale $149: 10 agents, 100,000 calls/month, all 5 scopes, 300 rpm — or a Paid Agent Plan — Pro $49: 5 agents, 10,000 calls/month, unlimited mint, 0.5% fee; Enterprise $129: unlimited agents/calls/mint, 0.25% fee — the lsk_ key operates strictly within that plan''s call and scope limits). Dashboard / SIWE registration: https://loyalspark.online/merchant → AI Agents, or POST https://api.loyalspark.online/agent-register-siwe once the wallet has a Store Plan, Paid Agent Plan, or registered agent.

    • Holder agents — header x-api-key: rwk_... (or Authorization: Bearer rwk_...). Issued via SIWE: https://loyalspark.online/.well-known/agent.json (200 calls/month Free quota or per-call x402).

    • x402 corridor — pay USDC on Base per call. Discovery (application/json): https://api.loyalspark.online/.well-known/x402. Marketing mirror (application/json): https://loyalspark.online/.well-known/x402.json. The extensionless https://loyalspark.online/.well-known/x402 is the same document but that host serves it as application/octet-stream; use the .json mirror or the API origin. Look first with no key: GET https://api.loyalspark.online/x402-gateway/public-programs ($0.001).


    Direct REST (this document, not only the paid gateway): every /agent-api and /recipient-api route, including free ones. Typical merchant flow (B20 default):

    1. GET /me — profile and scopes

    2. POST /programs — B20 createB20 calldata

    3. POST /register-program — persist program (status active)

    4. POST /update-program-config — set cashback_rate / points_per_dollar

    5. POST /rewards — catalog

    6. POST /mint or POST /earn — fee-first calls[] + fee_obligation_id

    7. POST /mint/confirm — settle protocol fee on-chain

    8. GET /analytics — metrics


    Legacy ERC-20: add POST /activate-program + program-status after register.


    Direct MCP: 43 merchant tools at https://api.loyalspark.online/loyalty-mcp and 20 recipient tools at https://api.loyalspark.online/recipient-loyalty-mcp. Paid x402 MCP paths: /x402-gateway/mcp-tools/<name> (32) and /x402-gateway/recipient-mcp-tools/<name> (16).


    Docs: https://loyalspark.online/api-docs · llms: https://loyalspark.online/llms.txt · agent manifest: https://loyalspark.online/.well-known/agent.json


    Plan limits: Free plan (issued via $0.01 POST /x402-gateway/register-agent when the wallet has no Store Plan or Paid Agent Plan): 1 agent, 200 API calls/month, 1,000 mint tokens/month, 1.25% mint fee, all 5 scopes (read, create_program, mint, trade, manage_rewards). Shopify Store Plans set the merchant''s ceiling (an agent plan does not raise a store ceiling): Starter ($39/mo) 1 agent, 1,000 calls/month, read only; Growth ($79/mo and 45-day store trial) 3 agents, 10,000 calls/month, read, mint, manage_rewards; Scale ($149/mo) 10 agents, 100,000 calls/month, all 5 scopes, 300 rpm. Paid Agent Plans: Pro ($49/mo) 5 agents, 10,000 calls/month, unlimited mint, 0.5% mint fee; Enterprise ($129/mo) unlimited agents, calls, and mint, 0.25% mint fee. Mint fee is charged in loyalty tokens: 1.25% Free, 0.5% Pro, 0.25% Enterprise.


    Access control: Keyed REST and MCP calls are scoped by Postgres row-level security to the owner wallet behind the lsk_/rwk_ key. On x402 and MPP, every recipient-api route, the merchant GET reads (programs, rewards, balance, customers, vouchers, analytics, merchant-profile, workflow/program-status), the merchant read MCP tools (list_loyalty_programs, list_rewards, get_token_balance, get_program_analytics, export_customers, and similar) and the holder MCP tools accept the payment alone: the paying wallet is the caller (holder on recipient routes, merchant owner on merchant reads). Other routes (mint, create program, create rewards, trade, bazaar tools) need a live lsk_ (merchant) or rwk_ (holder) key on the same request as the payment; a payment without that live key is not charged. Every keyed call and merchant read enforces the wallet''s plan rate and monthly call limits. These routes accept the payment alone; do not send an API key: GET /offers and GET /recipient-api/offers on both gateways, GET /public-programs ($0.001, active programs, same price as GET /programs), POST /x402-gateway/register-agent ($0.01 USDC on Base; when the wallet has no Merchant Store Plan or Paid Agent Plan, issues a full lsk_ key on the Free plan — 1 agent, 200 API calls/month, 1,000 mint tokens/month, 1.25% mint fee, all 5 scopes: read, create_program, mint, trade, manage_rewards; when the wallet belongs to a Merchant Store Plan — Starter $39: 1 agent, 1,000 calls/mo, read only; Growth $79 or 45-day store trial: 3 agents, 10,000 calls/mo, read, mint, manage_rewards; Scale $149: 10 agents, 100,000 calls/mo, all 5 scopes — or a Paid Agent Plan — Pro $49: 5 agents, 10,000 calls/mo, unlimited mint, 0.5% fee; Enterprise $129: unlimited agents/calls/mint, 0.25% fee — the lsk_ key operates strictly within that plan''s call and scope limits; unpaid SIWE registration without a plan returns HTTP 402 error_code payment_required and next_action pay_x402), POST /x402-gateway/mcp-tools/get_platform_info, POST /x402-gateway/mcp-tools/list_marketplace_offers, and POST /x402-gateway/recipient-mcp-tools/list_p2p_offers.


    Skills: 16 agent skill guides (00-15): https://loyalspark.online/.well-known/skills/index.md'
  contact:
    name: Loyal Spark
    email: admin@loyalspark.online
    url: https://loyalspark.online
  license:
    name: MIT
    url: https://loyalspark.online
  x-logo:
    url: https://loyalspark.online/new-favicon.png
    altText: Loyal Spark
  x-provider: Loyal Spark
  x-brand: Loyal Spark
  x-builder-code: bc_wdmnog7m
  x-mcp:
    url: https://api.loyalspark.online/loyalty-mcp
    transport: streamable-http
    tool_count: 43
  x-recipient-mcp:
    url: https://api.loyalspark.online/recipient-loyalty-mcp
    transport: streamable-http
    tool_count: 20
  x-x402-discovery:
    wellKnownResources: https://api.loyalspark.online/.well-known/x402
    gatewayBaseUrl: https://api.loyalspark.online/x402-gateway
    asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
    network: eip155:8453
  x-skills:
    url: https://loyalspark.online/.well-known/skills/index.md
    guide_count: 16
    range: 00-15
  x-plan-limits:
    free:
      api_calls_monthly: 200
      max_mint_amount_monthly: 1000
      max_agents: 1
      transaction_fee_percent: 1.25
      scopes:
      - read
      - create_program
      - mint
      - trade
      - manage_rewards
    starter_store:
      api_calls_monthly: 1000
      max_agents: 1
      scopes:
      - read
    growth_store:
      api_calls_monthly: 10000
      max_agents: 3
      scopes:
      - read
      - mint
      - manage_rewards
    scale_store:
      api_calls_monthly: 100000
      max_agents: 10
      scopes:
      - read
      - create_program
      - mint
      - trade
      - manage_rewards
    pro:
      api_calls_monthly: 10000
      max_mint_amount_monthly: null
      max_agents: 5
      transaction_fee_percent: 0.5
    enterprise:
      api_calls_monthly: null
      max_mint_amount_monthly: null
      max_agents: null
      transaction_fee_percent: 0.25
    note: 'Paying $0.01 at POST /x402-gateway/register-agent (when the wallet has no Store Plan or Paid Agent Plan) issues a full lsk_ key on the Free plan (1 agent, 200 calls/month, 1,000 mint tokens/month, 1.25% mint fee, all 5 scopes). A Shopify Store Plan caps that merchant: Starter 1 agent and 1,000 calls/month read only, Growth (and 45-day store trial) 3 agents and 10,000 calls/month read, mint, manage_rewards, Scale 10 agents and 100,000 calls/month all 5 scopes and 300 rpm. Paid Agent Plans: Pro ($49/mo, 5 agents, 10,000 calls/mo, unlimited mint, 0.5% fee) and Enterprise ($129/mo, unlimited agents/calls/mint, 0.25% fee).'
  x-access-control:
    model: row-level-security
    description: 'Keyed REST and MCP calls are scoped by Postgres row-level security to the owner wallet behind the lsk_/rwk_ key. On x402 and MPP, every recipient-api route, the merchant GET reads (programs, rewards, balance, customers, vouchers, analytics, merchant-profile, workflow/program-status), the merchant read MCP tools (list_loyalty_programs, list_rewards, get_token_balance, get_program_analytics, export_customers, and similar) and the holder MCP tools accept the payment alone: the paying wallet is the caller (holder on recipient routes, merchant owner on merchant reads). Other routes (mint, create program, create rewards, trade, bazaar tools) need a live lsk_ (merchant) or rwk_ (holder) key on the same request as the payment; a payment without that live key is not charged. Every keyed call and merchant read enforces the wallet''s plan rate and monthly call limits. These routes accept the payment alone; do not send an API key: GET /offers and GET /recipient-api/offers on both gateways, GET /public-programs ($0.001, active programs, same price as GET /programs), POST /x402-gateway/register-agent ($0.01 USDC on Base; when the wallet has no Merchant Store Plan or Paid Agent Plan, issues a full lsk_ key on the Free plan — 1 agent, 200 API calls/month, 1,000 mint tokens/month, 1.25% mint fee, all 5 scopes: read, create_program, mint, trade, manage_rewards; when the wallet belongs to a Merchant Store Plan — Starter $39: 1 agent, 1,000 calls/mo, read only; Growth $79 or 45-day store trial: 3 agents, 10,000 calls/mo, read, mint, manage_rewards; Scale $149: 10 agents, 100,000 calls/mo, all 5 scopes — or a Paid Agent Plan — Pro $49: 5 agents, 10,000 calls/mo, unlimited mint, 0.5% fee; Enterprise $129: unlimited agents/calls/mint, 0.25% fee — the lsk_ key operates strictly within that plan''s call and scope limits; unpaid SIWE registration without a plan returns HTTP 402 error_code payment_required and next_action pay_x402), POST /x402-gateway/mcp-tools/get_platform_info, POST /x402-gateway/mcp-tools/list_marketplace_offers, and POST /x402-gateway/recipient-mcp-tools/list_p2p_offers.'
servers:
- url: https://api.loyalspark.online
  description: Loyal Spark — canonical API origin for x402scan discovery and paid resource invocation. All listed x402 gateway paths return live HTTP 402 payment requirements.
security:
- apiKey: []
tags:


# --- truncated at 32 KB (181 KB total) ---
# Full source: https://artifacts.apis.io/loyalspark-online/openapi/loyalspark-online-recipient-rest-api-openapi.yml