EP-MEL-05 — Payment Gateway with Cash on Arrival, MFS, Cards
Companion: Backlog README ·
EPICS.md· canonical:07-epics-and-user-stories.md§7
Summary
| Wave | R1 (+ MFS expansion in R2) |
| Priority | P0 |
| Primary owner | payment-gateway-service |
| Participating services | billing-service, reservation-service, notification-service |
| Journeys realised | J-04 (Pay & Hold), J-05 (Front-Desk Check-in), J-08 (End-of-Day Reconciliation) |
| Workflows | WF-03 |
| Frontend surfaces | Tenant Booking Web · Tenant Booking Mobile · Electron Desktop |
| Story count | 8 |
Outcome
A unified payment surface for card (3DS), paypal, cash_on_arrival, and regional MFS adapters, with full lifecycle (capture, refund, chargeback, webhook idempotency) and end-of-day reconciliation.
Cross-cutting AC for this epic
- All amounts as
bigintmicro-units; currency code stored alongside. - Webhook handlers idempotent and replay-safe (signature + dedupe by
provider_event_id). - PCI scope strictly limited to
payment-gateway-service; tokens only outside. - Refunds and chargebacks emit audit events; manual finance approval required ≥ threshold.
Stories
| ID | Title |
|---|---|
| US-MEL-0042 | Card payment with 3DS |
| US-MEL-0043 | PayPal payment |
| US-MEL-0044 | Cash-on-arrival with deposit policy |
| US-MEL-0045 | MFS (Mobile Financial Services) adapters |
| US-MEL-0046 | Refund (full and partial) |
| US-MEL-0047 | Chargeback handling |
| US-MEL-0048 | Idempotent webhook processing |
| US-MEL-0049 | End-of-day cash drawer reconciliation |
Full AC in
../07-epics-and-user-stories.md§7.
Cross-references
- Payments architecture:
../10-payments-architecture.md - Service readiness:
../roadmap/service-readiness-gates.md - Definition of Done:
../standards/DEFINITION_OF_DONE.md