Scenario
Design the backend system for a mobile banking app.
Users can:
-
Sign up / log in
-
View balances and transaction history
-
Transfer money between their own accounts
-
Send money to other users (P2P)
-
Pay merchants via a
third-party payment processor
(e.g., card rails / ACH / external PSP)
The system must include:
-
Authentication & authorization
(MFA, session management)
-
Integration with a
third-party payment system
-
Fraud detection / risk controls
before executing payments
-
Auditability and compliance expectations typical for banking
Requirements
Functional
-
Account management (profiles, KYC status as a stub)
-
Balance + ledgered transactions
-
Payment initiation, status tracking, and reconciliation
-
Webhooks/callbacks from the third-party payment provider
-
Customer support features: ability to trace a payment end-to-end
Non-functional
-
Strong consistency for balances/ledger
-
Idempotent payment APIs
-
High availability and safe degradation
-
Security: encryption, secrets, least privilege
-
Observability: metrics, logs, traces
Deliverables
Describe:
-
APIs and core services
-
Data model (ledger vs. balance)
-
Payment flow (including idempotency and retries)
-
Fraud detection placement and how it interacts with execution
-
Failure handling and reconciliation