Exploring Banking and Fintech Systems
Banking and fintech products move value under strict expectations of correctness, security, privacy, and auditability. A transfer that appears fast but cannot be explained or reconciled is not a successful transfer. These are the questions I would ask before choosing the architecture.
Start with the movement of value
The product might expose accounts, cards, transfers, lending, investing, insurance, or financial planning. Each has a different lifecycle, but all need an authoritative record of what happened.
I want to model the states explicitly:
Requested → Authorized → Posted → Settled
↓ ↓ ↓
Rejected Reversed Reconciled
The balance shown to a user may include posted, pending, held, and available amounts. Those words need precise definitions because two screens showing different numbers can both be technically correct and still destroy trust.
A reference architecture
There is no single architecture used by every bank or fintech company. The shape depends on the product, regulation, scale, legacy systems, and which responsibilities belong to external providers. This simplified view shows common boundaries rather than a required implementation:
Clients should not connect directly to financial databases. They use the same identity, authorization, and policy boundaries on the server. The ledger records money movement, while separate stores may hold customer profiles, workflow state, documents, and reporting data. Some institutions build these components. Others use a core banking platform, processor, or banking service provider for part of the system.
One possible implementation
A conservative starting point could use Kotlin with Spring Boot for transaction services, PostgreSQL for the ledger and workflow records, and Apache Kafka for committed domain events. Temporal can coordinate long-running payment, settlement, and reconciliation workflows whose state must survive retries and restarts.
OpenTelemetry can connect technical traces to stable transaction identifiers while keeping sensitive values out of telemetry. The ledger's atomicity, idempotency, reconciliation, and audit requirements should decide the stack; replacing those properties with eventual consistency for convenience would be the wrong trade.
The ledger is the source of financial truth
A double entry ledger records every movement as balanced entries. Money should not appear through an update that has no corresponding source or destination.
- Entries are append only rather than silently overwritten.
- Every transaction has a stable identifier and business reference.
- Debits and credits balance in the same atomic operation.
- Corrections are new reversing or adjusting entries.
- Derived balances can be rebuilt from the ledger.
The ledger does not replace the product workflow. It gives the workflow an auditable financial foundation.
Idempotency and reconciliation prevent accounting errors
Networks time out after work may already have completed. A repeated transfer request must not move money twice merely because the caller did not receive the first response.
Idempotency keys, durable state transitions, uniqueness constraints, and careful retry policies make repetition safe. Reconciliation compares internal records with processors, banks, card networks, and settlement files. Differences need queues, named owners, and repair procedures rather than manual database edits.
Internal intent ↔ Ledger ↔ Provider record ↔ Settlement
compare and explain
Concurrent activity must preserve financial rules
Two withdrawals can arrive at the same time. A payment and reversal can cross. Interest, fees, and holds can affect the same account concurrently.
The design should state which rules require serial execution, database constraints, optimistic concurrency, or stronger isolation. I want each invariant enforced at a boundary that every channel uses, not only in one frontend.
Security begins with identity and authorization
Financial access requires continuing identity and authorization checks after login.
- Use authentication that resists phishing where the risk justifies it.
- Bind sensitive actions to the authenticated person, device, and session context.
- Apply additional verification when risk changes.
- Authorize every account and action on the server.
- Separate customer, employee, support, and service privileges.
- Protect secrets and cryptographic keys with managed rotation.
- Keep audit records that resist tampering for access and changes.
- Design account recovery as carefully as sign in.
Support tools are part of the attack surface. An employee should see and change only what their role and current task require.
Fraud and abuse are adaptive systems
Fraud controls combine rules, models, device signals, velocity limits, transaction history, and human investigation. Attackers respond to controls, so yesterday's threshold can become today's exploit.
A risk decision needs a suitable response: allow, challenge, delay, limit, or review. False positives matter because blocking a legitimate payment can be as harmful to the user as missing fraud. Models and rules need outcome monitoring, explanations suited to the decision, and a controlled way to restore the previous version.
Privacy and compliance constrain the design
Financial data needs classification, purpose limitation, retention, deletion rules, regional handling, and tightly controlled analytics access. Relevant obligations vary by product and jurisdiction, including identity verification, controls against money laundering, sanctions screening, payment card requirements, lending rules, and consumer reporting.
Compliance is not proof that the product is safe. It establishes requirements that still need sound engineering and operating practices.
Availability depends on the journey
Customers may need account access during a provider outage even when new transfers cannot be completed. The system can degrade deliberately:
- Show the most recently known balances with a clear freshness indicator.
- Accept a request only when its eventual processing is safe and understood.
- Disable a risky action while keeping statements and support available.
- Queue noncritical notifications without delaying the transaction.
SLOs should follow journeys such as sign in, balance retrieval, authorization, transfer submission, and statement access. Recovery objectives need to reflect how much financial state can safely be reconstructed or replayed.
Observability must connect technical and financial truth
Normal telemetry includes latency, errors, saturation, dependency health, and queue age. Financial systems also need counts and values by transaction state, unmatched records, duplicate attempts, settlement differences, fraud outcomes, and age of unresolved cases.
Every important transaction should be traceable across API calls, workflow state, ledger entries, provider references, notifications, and reconciliation without exposing sensitive data in logs.
User experience is part of correctness
People need to know whether an action is pending, complete, failed, reversed, or waiting for review. Dates, exchange rates, fees, limits, and recipient identity should be visible before confirmation.
Error messages should explain what the person can do next without revealing security controls. Accessibility, localization, currency precision, time zones, and understandable statements are part of correct financial behavior, not finishing work.
What changes with AI agents
An agent could categorize spending, explain a statement, prepare a transfer, compare products, or gather documents. It should not receive broad account authority merely because it can hold a conversation.
I would separate levels of agency:
Read and explain → Prepare → Ask for confirmation → Execute → Provide receipt
Delegated permissions should limit accounts, actions, amounts, recipients, duration, and frequency. Actions with serious consequences need fresh human confirmation through a trusted channel. Deterministic policy code, not the model, enforces limits and authorization.
Agent specific risks include misunderstood intent, prompt injection from financial documents, sensitive context leaking to a model provider, and repeated tool calls creating duplicate or costly actions. Idempotency, redaction, credentials that expire quickly, audit trails, spending limits, and easy revocation are necessary safeguards.
The web or mobile app remains important as a place to inspect balances, compare choices, manage permissions, review agent history, dispute an action, and recover control.
Try the money transfer experiment
The idempotent transfer lab is a working prototype for balanced ledger entries, retrying the same request without moving money twice, and rejecting an overdraft without partially changing balances. It runs locally without a payment account or paid service.
Questions I am wondering about
- What is the authoritative ledger, and can balances be rebuilt?
- Which financial and business invariants must hold under concurrency?
- How are retries, reversals, refunds, and duplicate requests handled?
- How are external records reconciled, and who owns differences?
- Which actions require additional authentication or human review?
- How are fraud controls measured for both misses and false positives?
- What can remain available when a provider or region fails?
- Can every transaction be explained without exposing sensitive data?
- How are schemas, rules, and models changed safely?
- If an agent acts, how is its authority bounded, confirmed, and revoked?
What I want to remember
Financial systems earn trust by preserving and explaining value through retries, failures, corrections, and change. Speed matters, but a durable ledger, explicit invariants, reconciliation, and human control matter more.