{"uid":"cap_6YhyXKK5tW42urp1Vb3UF","slug":"loyal-spark-earn-endpoint-4c99a2a8","name":"Loyal Spark Earn Endpoint","description":"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.","url":"https://api.loyalspark.online/x402-gateway/earn","method":"POST","headers":{},"bodySchema":{"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"}}},"responseSchema":{"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."},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_H3wiubzm3oH4ZlAk2tGKR","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Credits loyalty reward tokens to a user or account on the Loyal Spark onchain loyalty protocol running on Base L2","exampleAgentPrompt":"Record an earn event on Loyal Spark for customer wallet 0xABC...123 who just made a qualifying purchase — post it as a JSON body so their loyalty tokens get credited onchain.","exampleUseCases":null,"resultDescription":"Returns a JSON object with a boolean 'ok' field indicating success and a 'resource' field set to 'earn', confirming that the earn event was recorded on the Loyal Spark protocol.","failureModes":["Invalid or missing required body fields returns a validation error","Unsupported HTTP method in 'method' field returns an enum validation error","Payment not included or insufficient USDC results in 402 Payment Required","Malformed JSON body returns a parse error","Unauthorized or invalid credentials may return 401 or 403","Network or blockchain congestion may cause delays or timeouts"],"whenToPreferThis":"Use this endpoint when you need to programmatically credit or accrue loyalty reward tokens for a user on the Loyal Spark onchain protocol hosted on Base L2. Prefer this over generic webhook triggers when you specifically need the result to be recorded as an immutable earn event in the Loyal Spark ecosystem, with AI agent and MCP automation support.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:45:28.486Z","isFirstParty":false}