Multi-Tenant SaaS Ledger Architectures
Cloud-hosted accounting platforms operate on multi-tenant architectures where thousands of businesses share the same infrastructure while maintaining strict data isolation. Understanding how these systems work is essential for any engineer building or integrating with financial SaaS products.
Tenant Isolation Models
There are three common patterns for isolating tenant data in cloud ledger systems:
- Database-per-tenant — each customer gets a dedicated database instance. Maximum isolation but high operational cost at scale
- Schema-per-tenant — shared database server, separate schemas. Good balance of isolation and cost for mid-scale deployments
- Row-level security — single shared schema with tenant ID on every row. Lowest cost, requires disciplined query practices to prevent data leakage
Most large-scale accounting platforms use a hybrid approach: row-level security for transactional data with encrypted column-level isolation for sensitive fields like bank account numbers and tax identifiers.
Event Sourcing for Financial Data
Many cloud ledger systems have adopted event sourcing rather than traditional CRUD operations. Instead of updating account balances directly, every transaction is recorded as an immutable event. The current balance is derived by replaying the event stream. This provides a complete audit trail and makes it possible to reconstruct the state of the books at any point in time.
API Design for Accounting Integrations
Financial APIs need idempotency guarantees that most REST APIs do not provide by default. If a network timeout occurs during a payment recording call, the client needs to safely retry without creating a duplicate transaction. The standard approach is client-generated idempotency keys sent as request headers, with the server storing the key and returning the cached response for duplicate requests within a retention window.
Compliance Boundaries
Cloud accounting platforms operating across jurisdictions face data residency requirements. SOC 2 Type II certification is table stakes for US-market financial SaaS. European customers require GDPR-compliant data processing agreements and often demand that data remains within EU data centres. The architecture must support geographic routing of tenant data without fragmenting the shared infrastructure that makes multi-tenancy economical.