# Loyal Spark Recipient API - Accept Offer

> Loyal Spark Recipient API - Accept Offer 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-14).

Accepts a peer-to-peer trade offer for loyalty reward tokens on the Loyal Spark onchain protocol (Base L2)

## Facts

- Endpoint: POST https://api.loyalspark.online/x402-gateway/recipient-api/accept-offer
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/loyal-spark-recipient-api-accept-offer-a70489ed
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kTesq5yt_CmyQZBJYEVPS

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-recipient-api-accept-offer-a70489ed -d '<json body>'
```

Example prompt: Accept the pending trade offer on Loyal Spark for my loyalty reward tokens — submit it as a JSON POST so the offer gets confirmed and the ERC-20 tokens are transferred to my wallet.

## When to prefer this

Use this endpoint when an AI agent or user needs to accept an existing P2P loyalty token trade offer on the Loyal Spark protocol. This is specifically for the recipient side of an offer — not for creating offers, earning points through purchases, or redeeming tokens directly with a merchant. Choose this when the user has received a trade offer and wants to finalize the exchange of ERC-20 loyalty tokens on Base L2.

## Known failure modes

- Offer already accepted or expired — returns error indicating invalid offer state
- Missing required body fields (type, method, bodyType, body) — returns 400 validation error
- Invalid method value (only POST/PUT/PATCH accepted) — schema validation failure
- Payment not included or insufficient USDC — x402 payment required error
- Offer ID not found or not addressed to caller — authorization or not-found error
- Network or Base L2 RPC failure — server-side 5xx 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 object with an 'ok' boolean indicating success and a 'resource' field confirming the accepted endpoint path (e.g. {ok: true, resource: 'recipient-api/accept-offer'}), signaling the offer has been accepted onchain.

## 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-recipient-api-accept-offer-a70489ed/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)
