Multi-Tenant Accounting Systems: Isolation That Holds

Compare isolation models, understand company-level books, and test that one tenant cannot access another's records.

Paprel Engineering Team
6 min read
Three isolated tenant document stacks stand on separate pillars above a horizontal charcoal bar labelled Paprel Platform

A multi-tenant accounting system serves many customers on shared infrastructure while keeping each customer's books separate. In Paprel, a company is that boundary: one set of accounts, transactions and reports.

The key design question is: if application code forgets a tenant filter, can it read or change another customer's records?

This guide explains the isolation choices, the accounting records that need their own boundary, and a practical way to test your integration.

What tenant isolation should do

Imagine a platform serving two fictional businesses: Harbor Lettings and Cedar Design. Both use the same accounting service. Both can have an invoice numbered INV-001.

Harbor's token should read Harbor's invoice. It should never read Cedar's invoice, even if a request supplies Cedar's invoice ID. Harbor's trial balance should include only Harbor's accounts.

That is the distinction between shared infrastructure and shared books. Customers can use the same accounting engine without sharing their records or permissions.

Three ways to enforce isolation

These patterns describe where the boundary is enforced. They do not, by themselves, prove that an implementation is secure.

ModelHow it worksMain tradeoff
Application-level filteringEach query includes a tenant condition, such as WHERE tenant_id = ?.Simple to start, but a missed condition can expose another tenant's data.
Data-layer enforcementPolicies or mandatory scoping restrict reads and writes below application queries.Reduces reliance on individual filters; coverage, tenant context and privileged bypasses still need review.
Database per tenantEach tenant's records live in a separate database.Separates data stores, but multiplies migrations, backups and connection management. Routing and credentials still matter.

Company per tenant is a way to organize books, rather than a fourth enforcement mechanism. You still need to establish how access to each company is restricted.

Choose a model by examining its failure modes and operational requirements. A separate database does not prevent a request from being routed to the wrong database. A data-layer policy does not help a table or export path it does not cover.

For general implementation examples, see PostgreSQL's row security policies and Microsoft's SaaS database tenancy patterns.

What must stay separate in accounting

Each tenant is a reporting entity, so isolation must cover the full set of books:

  • Chart of accounts. Companies can start from the same template, then extend their own accounts independently. A posting must reference accounts belonging to that company.
  • Document numbering. Each company needs its own numbering rules and sequences. Harbor and Cedar can both use INV-001 without a collision.
  • Audit history. Users and auditors should receive only the history they are authorized to see, including through exports.
  • Reports. A company's trial balance, P&L and balance sheet must use that company's records. A balanced report alone does not prove isolation: records from two companies could still produce balanced totals.

Residency is a separate deployment question. Confirm the locations of hosting, backups, logs, support access and onward processing; a tenant's assigned region alone does not answer all of them. See deployment models.

Where Paprel fits: shared infrastructure, separate books

Paprel provides the accounting infrastructure beneath your product. Your application owns the customer experience; Paprel provides the accounting workflows, ledger and reporting.

The infrastructure is shared. Each company's books and access remain scoped to that company. This is the intended model to validate in your integration.

The documented building blocks are:

  • One company per set of books. Provisioning creates a ledger, document numbering and a default chart of accounts for each company. See tenancy and the ledger core.
  • Company-scoped access. App Connect tokens carry company context and route permissions. See authentication and tokens.
  • Platform provisioning. The Partner API creates customer companies associated with your platform. Retrying an unchanged item with the same external_company_id returns the existing company. See provision companies and users.

Company, organization and partner

  • Company: one separate set of books, with its own ledger, accounts, users and roles. This is the tenant boundary.
  • Organization: a company that also pays for and manages member companies on Paprel. Each member keeps its own books; authorized organization credentials can obtain a token scoped to a member company.
  • Partner: the platform companies use Paprel through, including its brand, domain and plans. White-label partners provision and manage companies through the Partner API under an agreement.

For example, an accounting firm can use an organization to manage separate companies for its clients. A software platform offering accounting under its own brand can use a partner agreement. In both cases, each company's books remain separate and access depends on permissions.

See the Paprel glossary for the full definitions, or the white-label platform setup guide for the partner workflow.

These are Paprel's documented design and integration behaviors. Review enforcement, privileged access and deployment terms with the team, and test the paths your product uses.

Five questions to ask before choosing a system

  1. Where is the boundary enforced? Ask which layer restricts access, which records it covers, and who can bypass it.
  2. What happens when tenant context is missing or wrong? Check reads and writes. Missing context must not widen access; supplying another tenant's record ID must not grant access.
  3. Do reports and exports obey the same boundary? Include background jobs, audit exports and bulk operations in the review.
  4. Which records and settings belong to each company? Confirm account ownership, numbering, permissions and audit history.
  5. How is intentional access to several companies granted? Ask for explicit permissions and an audit trail rather than assuming platform ownership grants access to every customer's books.

Use these alongside the ledger checks in the embedded accounting evaluation framework.

Try the two-company isolation check

The multi-tenant accounting API example creates two sandbox companies, posts an invoice and payment in each, and checks their separation:

  1. Each company's token requests the other company's invoice. The other invoice must not be returned.
  2. Each company's trial balance is checked for the other company's revenue account. That account must not appear.

This gives you a repeatable starting point. Extend it to writes, reports, exports and roles used by your application.

Validation scope: the example was run end to end in a new sandbox organization on 19 November 2026, where each company's token got data: null for the other's invoice, and it is tested against published request schemas and mocked responses. Running it creates sandbox companies and records. Passing these checks covers those paths, not every possible isolation defect.

Run the two-company example.

Continue learning

Posted by: Paprel Engineering Team · Engineering
Posted on: (Updated: November 19, 2026)
Evaluate Paprel

Build in sandbox, launch with a production trial

Use sandbox for developer testing with no billing. When you are ready for real workflows, start production on a monthly plan with a 14-day free trial.

API-First Delivery
Audit-Ready Controls
Sandbox And Guided Rollout