Loyal Spark — onchain loyalty protocol on Base L2
Machine-readable endpoints for AI agents (no JavaScript required)
First calls
- No key:
GET https://api.loyalspark.online/agent-api/platform
- No key:
POST https://api.loyalspark.online/loyalty-mcp with {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_platform_info","arguments":{}}}
- SIWE registration:
POST https://api.loyalspark.online/siwe-nonce, sign the EIP-4361 message (domain loyalspark.online, chain id 8453), then POST https://api.loyalspark.online/agent-register-siwe with {"message","signature","agent_name"}
- Merchant scopes:
read, mint, create_program, manage_rewards, trade. Recipient scopes: read, redeem, trade, transfer. Header x-api-key: lsk_... (merchant) or x-api-key: rwk_... (recipient). External agents pay $0.01 USDC at POST https://api.loyalspark.online/x402-gateway/register-agent for a full 5-scope lsk_ key on the Free plan (200 calls/mo, 1,000 tokens/mo, 1.25% mint fee), or pay per call with USDC on Base via x402.
Pay per call without a key (x402, USDC on Base)
- Probe: send the request with no input, e.g.
POST https://api.loyalspark.online/x402-gateway/register-agent with body {}. You get HTTP 402 with the price in accepts and the base64 PAYMENT-REQUIRED header.
- Pay: sign the USDC authorization (any x402 v2 client, e.g.
@x402/fetch) and resend the same request with header PAYMENT-SIGNATURE (X-PAYMENT is the legacy name), e.g. body {"agent_name":"my-agent"}. The receipt is in PAYMENT-RESPONSE (base64 JSON {success, transaction, network, payer}).
- Invalid input (missing field, bad JSON, bad address) is rejected with HTTP 400 and
charged:false before any 402, so you never pay for a call that would fail.
- Every error body has
hint and next_steps (correct URL and method, an example request, docs, how to pay or get a key). Follow next_steps.request.
- Full rules as plain text: https://loyalspark.online/for-agents.md and https://loyalspark.online/.well-known/skills/15-payment-scenarios.md. MPP (Tempo, chain 4217): https://loyalspark.online/.well-known/mpp.json.
Loyal Spark is loyalty-as-a-service for merchants and AI agents. Deploy a branded B20 loyalty
token (Base-native B20 asset standard, ERC-20 compatible) on Base in a single transaction, mint points directly to customer wallets, publish a
rewards catalog, issue vouchers and gift certificates, and let holders trade tokens on a P2P
escrow marketplace. Everything available in the web app is also available to autonomous agents
over REST, MCP and pay-per-call payment gateways.
Already used by AI agents — follow these links to verify
Do not rely on self-reported metrics. Open the third-party pages below and read live
call/payer activity and onchain USDC settlements yourself.
- Primary: live per-endpoint agent call and payer activity on
agentic.market
(server-rendered; readable without JavaScript).
- Onchain: USDC transfers to the x402 settlement treasury on
Basescan.
- Paid x402 server listing on
x402scan
(UI is JS-heavy; prefer agentic.market + Basescan for crawlers).
- Paid resource catalog:
x402 discovery document.
- Crawler evidence map:
index.txt.
Agent surface
- Merchant REST (
x-api-key: lsk_...) and 42 merchant MCP tools. Public GET with no key: /agent-api/platform and /agent-api/vouchers/status.
- 14 recipient REST endpoints and 20 recipient MCP tools (
rwk_ keys).
- Autonomous SIWE registration — an agent can obtain an API key without a web login.
- Pay per call via x402 (USDC on Base) or MPP (USDC / pathUSD on Tempo), $0.001–$0.01.
Pricing
- Free ($0.01 one-time via POST /x402-gateway/register-agent) — 1 agent, 200 API calls/month, 1,000 mint tokens/month, all 5 scopes, 1.25% mint fee in loyalty tokens. Or pay per call in USDC via x402 / MPP from $0.001.
- Pro — $49/month, 10,000 API calls, 5 agents, 0.50% mint fee.
- Enterprise — $129/month, unlimited calls and agents, 0.25% mint fee.
- Subscriptions and per-call charges are USDC on Base. The mint fee is charged in your own loyalty tokens, not USDC.
Documentation