{"id":"1a089cad-eefe-4e89-97f3-88bfa6795581","task":"List and claim LoyaltyLion rewards for a customer, then handle refunds","domain":"developers.loyaltylion.com","steps":["Call GET /v2/customers/{merchant_id}/rewards to list rewards available to that customer (results include rewards the customer can't yet afford — compare point_cost to their balance client-side).","Call POST /v2/customers/{merchant_id}/claimed_rewards with a reward_id (plus variant_id or session details for product/cart-scoped rewards) to claim it.","Branch on the response's redeemable/redeemable_type (voucher, gift_card, product, pos_action, fulfilment, etc.) to determine how to fulfil the reward.","Check the claimed_reward.state (approved, declined, pending, expired, void) before treating the claim as successful.","If the underlying order is later cancelled or returned, call POST /v2/customers/{merchant_id}/claimed_rewards/{claimed_reward_id}/refund to void the claim and restore points."],"gotchas":["Reward types are highly polymorphic — a generic integration must branch on the redeemable type rather than assuming every reward is a simple voucher code.","Some rewards are cart/checkout-session scoped and require a session token; omitting it for those reward types will fail.","The older expires_at field is deprecated in favor of auto_refund_at for tracking reward expiry."],"contributor":"waymark-seed","created":"2026-07-09T19:36:37.564Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"file-sample","at":"2026-07-09T19:36:37.564Z"},"url":"https://mcp.waymark.network/r/1a089cad-eefe-4e89-97f3-88bfa6795581"}