A Digital Wallet lets users:
Client → API Gateway → Wallet Service → Ledger Service
↓ ↓
Queue → Notification / Risk Engine
↓
External Payment Gateway / Bank
Wallet Table
| Field | Description |
|---|---|
| wallet_id | Unique ID per user |
| user_id | Owner |
| balance | Current computed balance |
| status | Active, frozen, closed |
| currency | Currency type |
Ledger Table (Immutable)
| Field | Description |
|---|---|
| entry_id | Unique entry |
| txn_id | Transaction ID |
| debit_account_id | Source wallet |
| credit_account_id | Destination wallet |
| amount | Transaction amount |
| created_at | Timestamp |
| status | Pending / Completed / Reversed |
User → Wallet Service → External Payment Gateway → Ledger Service
Steps:
Challenges: