Repository navigation
Description
Parent epic: #2093
Priority
P1 — Next customer value after the shared integration release.
User journey
Customer defines a reward → fan claims it → Recoup reserves points and limited availability → customer receives the claim → customer confirms delivery or failure → points and claim status settle consistently.
Acceptance criteria
- Customer defines reward terms, point cost, availability, claim limits, fulfillment contact/integration, and enabled/disabled state. Recoup does not supply, fund, ship, or guarantee the reward.
- Reserve points and available quantity atomically at claim creation; repeated requests return the same claim. Concurrent claims cannot overspend points or overbook declared availability.
- Separate claimed/reserved, awaiting customer fulfillment, fulfilled, failed, canceled, and expired states. Only an authorized fulfillment confirmation marks delivery complete.
- Deliver signed customer notifications with unique event IDs, retries, delivery history, and manual recovery. Support authenticated manual customer fulfillment updates where no external integration exists.
- Settle reserved points on confirmed fulfillment and release or return them under documented failure/cancellation rules. Define timeout, late confirmation, retries, and already-delivered disputes so duplicate messages cannot refund and fulfill the same claim.
- Provide customer and fan views of claim status and point changes; expose management/status operations through API/MCP with tenant isolation and minimal data disclosure.
Blocking dependencies
These are completion prerequisites, mirrored in GitHub’s blocked-by links. Design and contract work may start earlier. Other coordination references are not blockers.
Validation
Test last-item claim races, duplicate delivery/acknowledgment, unavailable customer endpoint, failed fulfillment, timeout followed by late success, manual recovery, canceled claims, and insufficient points.
Architecture and ownership
Customer-owned program; Recoup-owned infrastructure. Shared API business logic supports MCP, Recoup Sites, and independent apps. Database changes go through the database repository PR workflow. Use existing durable workflow patterns for notifications and reconciliation. Customer API credits and fan reward points are distinct systems. External games own their scoring and score leaderboards.
Approved category and ownership
Reward definitions, claims, and fulfillment confirmations are Fans resources. Rewards Widgets display availability and submit authorized claims. The customer supplies and delivers rewards; Recoup provides the infrastructure.
Parent epic #2093 defines Sites, Fans, and Widgets. Use those names in public documentation and MCP descriptions. Preserve existing functional requirements, dependencies, and authorization/billing boundaries.
Activity
[-][Sites] Track reward claims and hand fulfillment to the customer[/-][+][Fans] Track reward claims and hand fulfillment to the customer[/+]