Skip to content
Innopulse Consulting
SaaS Building

FinTech architecture: money, accuracy and trust in code

Software that handles money: no floating point, double-entry ledgers, idempotency, reconciliation, audit trails, currencies, regulation and card data.

Leutrim Miftaraj
Leutrim Miftaraj
Founder & CEO
·Updated ·9 min read

Software that handles money forgives no inaccuracy. A rounding error, a payment executed twice or an entry without its counter-entry are not cosmetic bugs; they destroy trust. This article describes the architecture patterns that have proven themselves in finance, accounting and wealth applications, as we use them for FLIORE, for example.

Never store amounts as floating point

Floating-point numbers cannot represent many decimal fractions exactly; 0.1 plus 0.2 is not exactly 0.3 in many languages. For money this means: amounts are stored as integers in the smallest unit, such as rappen or cents, or as the database’s exact decimal type. Rounding happens deliberately, at a defined point and by a documented rule — for cash amounts in Swiss francs, for example, to five rappen.

Double-entry bookkeeping in the data model

A ledger built on double-entry bookkeeping has proven itself: every movement consists of at least two entries summing to zero. Balances are not overwritten but calculated from the entries. That makes every figure traceable and errors visible, because an entry without a counter-entry stands out immediately.

Idempotency

Networks are unreliable. A payment request may execute while the response is lost; the client retries, and the payment runs twice. The solution is idempotency keys: every operation carries a unique identifier, and the system does not execute an operation with a known identifier a second time but returns the original result. The same applies to incoming webhooks from payment providers, which may be delivered more than once.

Reconciliation

What is in your own system must match reality: bank statements, custody reports, payment providers. Regular, automated reconciliation finds discrepancies before customers notice — missing entries, duplicates, wrong rates. Discrepancies are not silently corrected but handled as cases with a reason.

Immutable traceability

In financial applications every change must be traceable: who, when, what, why. An audit trail that is only appended to and never overwritten is the foundation. For sensitive operations such as payouts or changes to bank details, the four-eyes principle is added, enforced technically in the system.

Currencies and time

Amounts are always stored with their currency, never as bare numbers. Exchange rates are recorded with timestamp and source so every conversion can be traced later. Timestamps are stored in UTC and translated into the local time zone only for display; cut-off dates such as month-end or value dates follow clear rules.

Card data and regulation

Anyone accepting card payments should never process card data themselves but use a payment provider that holds it; that considerably reduces the effort for card industry security standards. Anyone accepting or managing client funds must clarify in advance whether a FINMA licence is required and whether anti-money laundering duties apply. These questions belong at the start of product planning, not at the end.

Security and data residency

Financial data is attractive to attackers and particularly sensitive for customers. Tenant isolation at database level, encrypted storage, least privilege and a deliberate choice of data region are mandatory; the patterns are described in our article on building a DACH SaaS.

The short version

  • Amounts as integers in the smallest unit or as an exact decimal type.
  • Double-entry bookkeeping instead of overwritten balances.
  • Idempotency keys for every money movement and every webhook.
  • Automated reconciliation with bank, custodian and payment provider.
  • Append-only audit trail, four-eyes principle for sensitive operations.
  • Always store currency, rate and timestamp.
  • Card data with the payment provider, regulation clarified early.

How pricing and billing in two currencies work is described in our article on SaaS pricing in CHF and EUR. We implement the architecture of such applications through our multi-tenant SaaS architecture offer.

About the author
Leutrim Miftaraj
Leutrim Miftaraj
Founder & CEO · Innopulse Consulting

Founder of Innopulse Consulting, IT project lead and business analyst. Mandates incl. EDA, MeteoSwiss, FSO, SERI, FINMA, Swisscom and BLS. MSc FFHS, PMP, IREB CPRE. Author of “Identity Over Discipline”.

Topics
fintech architecturehandling money in codepayment idempotencydouble entry ledger softwarefintech saas switzerland
Working on something similar?

Let's talk.

If this article maps to a problem you're actively working on, send us a short description — we'll respond with a practical next step.