Phase 1 | Priority: P0 | Status: Not Started | Covers: FR-004
Objective
Build the service that grants account credit to both referrer and referee when the qualifying event fires.
Acceptance Criteria
- Listens for qualifying event (default: email_verified) via event bus
- Credits configurable amount (default $10) to both referrer and referee via credit ledger API
- Idempotent: duplicate events don't double-credit
- Fires reward_granted analytics event with referrer_id, referee_id, amount
- Qualifying event type is configurable (env var / feature flag) for easy swap
Technical Notes
BLOCKED pending Legal/Finance confirmation on reward amount and qualifying event. Build with configurable defaults so we can swap values without code change.
Dependencies
Depends on: attribution tracking, credit ledger API contract. Blocks: end-to-end testing.