E2-F7: Match Cancellation Workflow¶
Epic: E2: Match & Stadium Management
Size: M (Medium)
Problem / Outcome¶
Admins cancel matches with automatic refund processing.
Scope¶
In-Scope:
- Cancel match action
- Super Admin approval requirement
- Batch refund trigger for all ticket holders
- Notification to all ticket holders
- QR code invalidation
Out-of-Scope:
- Partial cancellation
- Rescheduling
Acceptance Criteria¶
- AC1: Given match cancellation, when approved, then all tickets cancelled and refunds initiated
- AC2: Given card payments, when cancelled, then refunds process via gateway
- AC3: Given cancellation complete, then all ticket holders notified via email and push
Data Model Impact¶
Match table:
- status (ENUM includes: CANCELLED)
Ticket table:
- status -> set to CANCELLED
- cancellation_reason -> set to MATCH_CANCELLED
- cancelled_at -> timestamp of cancellation
- cancelled_by -> admin user id
Refund table (per ticket):
- source -> SYSTEM (or SUPPORT if manually issued)
- status -> PENDING (downstream lifecycle handles approval & payout)
- refund_amount, payment_id, requested_by
Match-cancelled tickets share the generic
CANCELLEDstatus with self-service cancellations; the discriminator iscancellation_reason = 'MATCH_CANCELLED'. Reports must bucket on the reason column, not the status.
Permissions/Roles¶
- Admin (Match Manager) - initiates cancellation
- Super Admin - approves cancellation
How to Verify¶
npm test -- --grep "match cancellation"
Expected: Status transitions, refunds triggered, notifications sent.
Dependencies¶
Implementation Tasks¶
See E2: Match ## Doc References Stadium Tasks
Doc References¶
Last Updated: January 2026