Skip to content
_NUMSCRIPT/

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.

_01/

The guarantees

_Atomic execution/

All postings commit, or none do. A partial execution is not a state the ledger can be in.

_Balanced by construction/

A Numscript program cannot produce an unbalanced posting. Double-entry is the physics, not a convention.

_Deterministic integer math/

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.

_Predictable rounding/

Indivisible remainders allocate from the top of the destination list down, by rule. No invisible fractions, no mystery money.

_No accidental overdraft/

Accounts cannot go negative unless the script says so, explicitly and boundedly (overdraft up to an amount, or allowing unbounded where intended).

_No race conditions/

The ledger handles locking and sequencing. Concurrency safety is not your application's problem.

_02/

The vocabulary

_send/

One statement per movement: an amount, a source, a destination.

_Ordered sources/

Pull from several accounts in priority order (spend the coupon first, then the user's balance).

_Split destinations/

Percentages, nested splits, and remaining for whatever is left.

_max caps/

Bound any leg: take at most $20 from the promotion account, the rest from the user.

_Variables and metadata/

Parameterize accounts, amounts, and portions per execution; read rates and tiers from account metadata; write context onto the transaction.

_Templates/

One reviewed, versioned script per business event: settle, refund, payout, write-off.

_03/

The toolchain (open source, MIT)

_Standalone interpreter/

Implemented in portable Go with a formal ANTLR grammar. Not locked inside the Formance stack.

_CLI/

Parse, check, and run scripts locally; install via curl or go install.

_Language server/

Diagnostics, hover, symbols, and go-to-definition in your editor.

_Playground/

Try flows in the browser at playground.numscript.org, no setup.

_SHOWCASE/

A marketplace payout: nested splits, deterministic remainder.

numscript
send [USD/2 599] (
  source = @rides:0234
  destination = {
    85% to @drivers:042
    remaining to {
      10% to @charity
      remaining to @platform:fees
    }
  }
)
numscript
send [USD/2 29900] (
  source = {
    10% from {
      max [USD/2 2000] from @coupons:FALL24
      @users:1234
    }
    remaining from @users:1234
  }
  destination = @payments:4567
)

Both are single atomic transactions. If any leg cannot post, nothing posts.

_VOICES/

Trusted by builders

LiberisLiberis
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
DoctolibDoctolib
Formance is the foundation of our Financial OS, the open-source approach lets us retain control over this key component.

Healthcare · Financial OS

PayflipPayflip
Formance helped us kick off our move into fintech, with robust infrastructure and intuitive developer tooling.

Benefits · fintech infrastructure

_TRUST/

Built for regulated money.

Enterprise controls, the certifications auditors ask for, and an immutable record, out of the box.

See our trust center
THE COMPLIANCE STACK
IAM, RBAC & SSO
Non-repudiation
Audit logs
Observability & monitoring
Real-time events
Admin console
_AUDIT-LOG/ NON-REPUDIATION

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

CERTIFICATIONS
AICPA SOC IICERTIFIED
ISO 27001CERTIFIED
DORACOMPLIANT
REGULATORY FRAMEWORKS
EMIFCAMTLNYDFS Trust CharterOCC CharterMiCAGENIUS
_ATTESTED/
_PREV/

Ledger primitives

_NEXT/

Connectors

FAQ

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.

GET STARTED

Write the flow, not the plumbing

Try a real flow in the playground, or start building against a sandbox.