What is Ledfra?
Ledfra is the accounting layer for platforms that move money. It is a developer-first, double-entry ledger you can build on through an API and operate through a web app — with real-time balances, audit-ready reports, and zero reconciliation debt.
If your product holds, moves, or owes money on behalf of other people — a marketplace paying out sellers, a SaaS tracking customer credits, a fintech moving funds between accounts — you need a system of record that is always correct and always explainable. Ledfra is that system of record.
The problem Ledfra solves
Most teams start by tracking money in the same database tables that run their product. A balance column here, a payouts table there. It works until it doesn't: numbers drift, a refund double-counts, finance asks “why is this $0.03 off” and an engineer loses a week. Month-end becomes an all-nighter because every report is stitched together by hand from sources that were never meant to agree.
Ledfra replaces that with a single, purpose-built ledger:
- Correct by construction. Double-entry is enforced when you post. You literally cannot record an unbalanced transaction.
- Real-time and audit-ready. Every balance, profit-and-loss figure, and balance sheet is derived live from the ledger. Every entry is immutable and traceable back to the event that created it.
- Built to integrate. A small REST API, idempotent writes, an OpenAPI spec, and sandboxes mean you can post your first transaction in an afternoon.
Built for engineers. Loved by accountants.
How Ledfra is organized
Ledfra has a small, deliberate set of concepts. Once you know these four, you know the model.
- Workspace — your organization. Everything below lives inside a workspace, and an API key is bound to exactly one workspace.
- Ledger — a self-contained book of accounts with its own chart of accounts, currencies, and balances. A workspace can hold many ledgers, and each ledger is either a live production ledger or a sandbox copy for safe testing.
- Account — a single line in a ledger's chart of accounts that money posts against, addressed by a human-readable slug like
assets:cashorliabilities:user/123. Accounts come in two kinds, covered in Accounts. - Transaction — a balanced, double-entry record of money moving within a ledger. Every transaction has two or more entries whose debits and credits net to zero, which is what keeps the ledger in balance at all times.
A transaction is the unit of truth. When a marketplace collects $95 on behalf of a seller, that is one transaction with two entries: cash goes up, and what you owe the seller goes up by the same amount. The ledger refuses to record it any other way.
Why double-entry, and why it matters to you
Double-entry bookkeeping has been the standard for accuracy for centuries because it is self-checking: every movement is recorded twice, and the books only balance if nothing was lost. Ledfra enforces this at the API boundary rather than hoping application code gets it right.
For a developer, that means you can't ship a bug that silently loses money — an unbalanced write is rejected, not absorbed. For a product manager, it means new money-movement features inherit correctness instead of re-implementing it. For a CFO or controller, it means the numbers in the dashboard are the numbers in the ledger, with a complete audit trail behind every one.
Real-time reporting, no reconciliation
Because every report is derived from the ledger itself, your balance sheet, profit-and-loss, and cash-flow views are live and never drift from the source of truth. There is no nightly export, no separate reporting database to reconcile, and no “which number is right” debate. Reports are time-zone aware, so a team in New York and a team in Tokyo each see the same ledger rolled up by their own calendar day.
What you can do with Ledfra
- Design a chart of accounts visually, or define account templates that create per-customer sub-accounts automatically as transactions arrive.
- Post balanced, multi-entry transactions through the API, safely and idempotently.
- Read real-time account balances and full transaction history.
- View and export live balance sheet, profit-and-loss, and cash-flow reports.
- Work safely against sandbox ledgers before touching production.
Built for correctness
Ledfra is a financial system first, so it is conservative by design. Money is represented with exact precision across currencies — fiat, crypto, and points alike — with no floating-point rounding anywhere on the wire (see Money). Records are immutable and soft-deleted rather than destroyed, preserving the audit trail. And every figure you see is computed once, on the server, so there is a single source of truth.
Concepts
- Control vs. template accounts
- Why account slugs
- Listing & fetching accounts
- The amount string format
- Exact precision, no rounding
- Rules that keep writes balanced
- How double-entry works
- Anatomy of a transaction
- Worked examples & reversals
- What a sandbox is
- Structure synced from production
- Using a sandbox from the API
Examples
Ready to integrate? Authenticate and call the endpoints in the API Reference.