_Docs/
Get StartedModulesPlatformDeployCookbookChangelogReference
_Stack
_Modules
  • Ledger
    • Quick Start
    • Core Concepts
      • Accounts
      • Transactions
      • Constraints
      • Source/destination
      • Designing a Chart of Accounts
    • Working with the Ledger
      • Assets & Currency conversion
      • Bi-temporality
      • Bulk processing
      • Filtering queries
      • Idempotency
      • Data isolation with buckets
      • From credit/debit to source/destination
      • Streaming to analytics systems
      • Ledger Schema
    • Advanced Topics
      • Architecting for scale
      • Events Publishers
      • Performance model
  • Numscript
  • Connectivity
  • WalletsEE
  • FlowsEE
  • ReconciliationEE
  1. Modules
  2. Ledger
Ledger

Ledger

Formance Ledger is a programmable, double-entry accounting database designed for financial applications. It provides an immutable, tamper-evident transaction log with built-in concurrency control, multi-asset support, and a powerful scripting language (Numscript) for modeling complex money movements.

Getting Started#

Quick Start

Your first transactions in 5 minutes — fund accounts, split payments, check balances.

Numscript

The scripting language for modeling financial operations — splits, holds, overdrafts, and more.

Accounts & Transactions

How the data model works — accounts, transactions, and the immutable log.

Example Implementations

Omnibus accounts, card issuing, payment acceptance, stablecoin operations.

Product Ledger vs General Ledger#

Ledger TypePurpose
General Ledger (GL)Organizes financial events to produce clarity on the financial position of a business. Typically lives in an ERP (Sage) or GL tool (QuickBooks).
Product LedgerTechnological foundation for automated flow of funds. Focuses on scarcity, concurrency, auditability, immutability, and performance.

Formance Ledger enforces the double-entry transaction model by design — every transaction involves two or more accounts in compensating directions, and balances are derived from an immutable log. It is flexible regarding accounting business rules (account classification, debit/credit conventions), letting you choose how much accounting logic to handle in real-time versus delegating to a GL.

Use Formance as a product ledger. Add basic account classification in your Chart of Accounts to lay a foundation for subsequent data mapping to your GL.

Data Immutability#

Each transaction produces a hash from its data combined with the previous transaction's hash, creating a tamper-evident chain. This ensures the ledger remains a permanent, indelible history of transactions — similar to a blockchain mechanism.

Log hashing can be disabled for performance. See Data isolation with buckets for configuration.

Data Model#

ResourceDescription
AccountsContainers for assets. See Accounts.
TransactionsMovements of assets between accounts. See Transactions.
LogsImmutable log entries (NEW_TRANSACTION, SET_METADATA) — the primary source of truth.

All resources are fully isolated per ledger. Two ledgers can have accounts with the same name without interference.

Single vs Multi-Ledger#

Formance Ledger is multi-ledger — you can operate multiple independent ledgers in a single instance. The choice depends on your application:

  • Multi-ledger: better horizontal scaling (write locking is per-ledger), good for multi-tenant apps or high write volume with data segregation
  • Single ledger: simpler — no need to manage cross-ledger consistency or check which ledger an account belongs to
Quick Start
On This Page
  • Getting Started
  • Product Ledger vs General Ledger
  • Data Immutability
  • Data Model
  • Single vs Multi-Ledger