
🏦 Finance & Banking · Class UML
An object model for a digital wallet app: users, wallets, transactions, payment methods and KYC levels.
Drawing diagram…
Class diagram for a digital wallet: User has one Wallet and a KycLevel (MIN, FULL) that sets wallet limits. Wallet has balance and methods to add money, pay and transfer. PaymentMethod is an interface implemented by UpiMethod, CardMethod and NetBankingMethod. Transaction records amount, type, status and timestamps.
classDiagram
class User {
+String id
+String name
+String mobile
+KycLevel kycLevel
}
class Wallet {
+String id
+Decimal balance
+addMoney(amount, method)
+pay(merchant, amount)
+transfer(toUser, amount)
+limit() Decimal
}
class Transaction {
+String id
+Decimal amount
+String type
+String status
+DateTime createdAt
}
class PaymentMethod {
<<interface>>
+charge(amount) Transaction
}
class UpiMethod
class CardMethod
class NetBankingMethod
class KycLevel {
<<enumeration>>
MIN
FULL
}
User "1" --> "1" Wallet
User --> KycLevel
Wallet "1" --> "*" Transaction
PaymentMethod <|.. UpiMethod
PaymentMethod <|.. CardMethod
PaymentMethod <|.. NetBankingMethod
Wallet ..> PaymentMethod : usesThe steps behind a UPI payment: the payer's app, the payer's bank, NPCI's UPI switch and the payee's bank, from entering a UPI ID to the money arriving.
A payment gateway that lets online merchants accept cards and UPI: the checkout, the payment core with fraud checks, and the card networks and banks it connects to.
A personal loan from application to disbursal: KYC, credit bureau check, underwriting rules, manual review for borderline cases, and the final agreement.
What happens in the second after a card is tapped or entered online: the acquirer, card network and issuing bank authorise the payment, with 3-D Secure for online payments.
How a bank scores every transaction for fraud in milliseconds: features from history, an ML model, rules, and a case queue for analysts.
The main building blocks of a bank's core platform: accounts, deposits, loans, payments and the general ledger, used by branches, internet banking and mobile.