{"uid":"cap__5zr8qYjOtqgl6nnPiWkT","slug":"loyal-spark-prepare-reward-redemption-85eae0ab","name":"Loyal Spark – Prepare Reward Redemption","description":"Onchain loyalty protocol on Base L2. Launch B20 rewards, earn and redeem tokens, trade P2P, automate with AI agents via REST and MCP.","url":"https://api.loyalspark.online/x402-gateway/recipient-mcp-tools/prepare_reward_redemption","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","toolName","inputSchema"],"properties":{"type":{"type":"string","const":"mcp"},"example":{"type":"object"},"toolName":{"type":"string"},"transport":{"enum":["streamable-http","sse"],"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{}}}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_d5sUHf2NffTtGvLOwOA5o","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Prepares and stages an onchain loyalty token redemption transaction for a recipient on the Base L2 network, returning the transaction data needed to execute the redeem.","exampleAgentPrompt":"Prepare a redemption of 500 B20 loyalty tokens from the CoffeeHouse rewards program for my wallet 0xABC123 on Loyal Spark — I want the transaction payload so I can broadcast it.","exampleUseCases":[{"title":"Customer cashing out loyalty points","prompt":"Prepare the redemption transaction for my wallet 0x1234abcd to redeem 200 B20 tokens from the ShopNow loyalty program on Loyal Spark — give me the payload I need to complete it."},{"title":"AI agent automating user reward payouts","prompt":"For the user with wallet 0x9876fedc who has earned 1000 tokens in the Café Bloom loyalty program, prepare the onchain redemption transaction on Loyal Spark so the agent can broadcast it automatically."},{"title":"Staging bulk reward redemptions before settlement","prompt":"Prepare the redemption transaction for wallet 0xDEAD5678 wanting to redeem all 750 accumulated B20 tokens from the FitClub rewards program — I need the full transaction parameters ready to sign."}],"resultDescription":"Returns a JSON object containing the prepared redemption transaction payload, including encoded transaction data, estimated gas parameters, token amounts, recipient details, and any validation status needed to subsequently broadcast the redemption to the Base L2 network.","failureModes":["Insufficient token balance — redemption amount exceeds available B20 tokens for the recipient","Invalid wallet address — malformed or unrecognized recipient address","Unknown reward program ID — the specified loyalty program does not exist","Network congestion or Base L2 RPC errors causing preparation failure","Payment not received — x402 payment of $0.005 USDC not confirmed before processing","Redemption window closed — the loyalty program may have paused or ended redemptions"],"whenToPreferThis":"Use this endpoint when an AI agent or application needs to prepare (but not yet broadcast) a loyalty token redemption on the Base L2 network via Loyal Spark. It is the correct first step in a two-phase redeem flow — call this to get the transaction payload, then separately sign and broadcast. Prefer this over direct smart contract calls when you want a managed, REST-based preparation step with built-in validation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:52:03.618Z","isFirstParty":false}