Describe the money. The ledger does the rest.
An open-source language for financial transactions: declare what should move, and the ledger executes it atomically, balanced, with deterministic integer math. No orchestration, no cleanup, no mystery money.
A simple "move funds from A to B" becomes a system of chained API calls, balance checks, and conditional logic, and every addition introduces risk. Balances fall out of sync, logs fill with partial data, and nobody can reconstruct what really happened. Numscript replaces that orchestration with a declaration: you describe what the transaction means, the ledger guarantees how it executes. The shift is from procedural code that manages money to a language that describes it. Engineers get fewer failure modes, finance gets logic they can read, auditors get a single source of truth.
The guarantees
All postings commit, or none do. A partial execution is not a state the ledger can be in.
A Numscript program cannot produce an unbalanced posting. Double-entry is the physics, not a convention.
Integer-only amounts in Unambiguous Monetary Notation ([USD/2 599] is $5.99). No floating point, ever, so the same inputs always produce the same postings.
Indivisible remainders allocate from the top of the destination list down, by rule. No invisible fractions, no mystery money.
Accounts cannot go negative unless the script says so, explicitly and boundedly (overdraft up to an amount, or allowing unbounded where intended).
The ledger handles locking and sequencing. Concurrency safety is not your application's problem.
The vocabulary
One statement per movement: an amount, a source, a destination.
Pull from several accounts in priority order (spend the coupon first, then the user's balance).
Percentages, nested splits, and remaining for whatever is left.
Bound any leg: take at most $20 from the promotion account, the rest from the user.
Parameterize accounts, amounts, and portions per execution; read rates and tiers from account metadata; write context onto the transaction.
One reviewed, versioned script per business event: settle, refund, payout, write-off.
The toolchain (open source, MIT)
Implemented in portable Go with a formal ANTLR grammar. Not locked inside the Formance stack.
Parse, check, and run scripts locally; install via curl or go install.
Diagnostics, hover, symbols, and go-to-definition in your editor.
Try flows in the browser at playground.numscript.org, no setup.
A marketplace payout: nested splits, deterministic remainder.
Both are single atomic transactions. If any leg cannot post, nothing posts.
Trusted by builders
“Formance enabled us to ship new lending products faster by providing a customizable foundation that let us reliably express the complexities of our flow of funds.”
Embedded finance · reconciliation across 14 countries
See customer story“Formance is the foundation of our Financial OS, the open-source approach lets us retain control over this key component.”
Healthcare · Financial OS
“Formance helped us kick off our move into fintech, with robust infrastructure and intuitive developer tooling.”
Benefits · fintech infrastructure
Built for regulated money.
Enterprise controls, the certifications auditors ask for, and an immutable record, out of the box.
09:41:07Z AUDIT gateway POST /api/ledger/v2/main/transactions 200 sub:ops@acme.io
09:41:09Z LOG id:4093 NEW_TRANSACTION ledger:main
09:41:12Z LOG id:4094 SET_METADATA ledger:main
09:41:15Z LOG id:4095 REVERTED_TRANSACTION ledger:main
09:41:18Z AUDIT gateway GET /api/ledger/v2/main/logs 200 sub:audit@acme.io
Keep going
Everything you need to evaluate and build on Formance.
Questions, answered
01 / IS NUMSCRIPT A FULL PROGRAMMING LANGUAGE?
No, deliberately. No loops, no side effects, no I/O. It describes money movement and nothing else, which is what makes it verifiable, auditable, and safe to run against real balances.
02 / HOW DOES IT AVOID ROUNDING ERRORS?
Amounts are integers in Unambiguous Monetary Notation, so precision is explicit per asset ([USD/2], [BTC/8]). Splits that leave an indivisible unit allocate it deterministically from the top of the list down. The same script and inputs always produce identical postings.
03 / IS IT TIED TO THE FORMANCE LEDGER?
Numscript is the transaction language of the Formance Ledger, but the interpreter is a standalone open-source project (Go, MIT, formal grammar), with its own CLI, language server, and playground.
04 / WHO WRITES IT, AND HOW IS IT TESTED?
Engineers write and version one template per business event; product, finance, and auditors can read them. Iterate in the playground, validate with the CLI and language server, run against a sandbox ledger. Determinism means what passes in test behaves identically in production.
Write the flow, not the plumbing
Try a real flow in the playground, or start building against a sandbox.


