# Formance Ledger

Programmable core ledger for fintech: multi-posting transactions and Numscript over a REST API.

Formance Ledger is a Postgres-backed financial ledger service for apps that hold or move money: user balances, marketplaces, payouts, loans. Transactions are atomic multi-postings, optionally written in the Numscript DSL, and every account, balance, volume and log is queryable over the v2 API with official SDKs. MIT standalone; Formance sells an enterprise platform on top.

Alternative to: Modern Treasury

- Capabilities: adaptable, operable
- Vertical: invoicing-finance
- Shape: internal-tool
- Form factor: api
- Execution model: deterministic
- Provenance: unknown (recorded, never ranked)
- Repo: https://github.com/formancehq/ledger (MIT), 1373 stars, last commit 2026-09-03
- Last activity: 2026-09-03
- Page: apps/formancehq--ledger.html
- JSON: apps/formancehq--ledger.json

## Use it when

- I am building a wallet, marketplace or lending product and need a ledger that will not let balances go wrong
- I want my agent to post and query money movements through a typed API instead of a spreadsheet

## Gotchas

- Production is only supported through the Formance Kubernetes operator; the compose file is for local use
- A ledger, not an accounting package: no invoices, tax or reporting UI
- Numscript is its own language to learn

## Editions

- Open Source: Free, open source
  - source: https://github.com/formancehq/ledger
  - container: docker compose -f examples/standalone/docker-compose.yml up
  - binary: https://github.com/formancehq/ledger/releases
- Enterprise: Free, closed source
  - hosted: https://www.formance.com/pricing

## Adaptable: make it yours

Effort: config-only (9 things to edit)

Run the standalone compose and set the Postgres URI, bind address, auto-upgrade and bulk parallelism as env vars or CLI flags; the chart of accounts is whatever account paths you post to. Business rules live in Numscript templates your app sends, which is the real customization surface.

- Env vars: POSTGRES_URI, POSTGRES_MAX_OPEN_CONNS, POSTGRES_MAX_IDLE_CONNS, AUTO_UPGRADE, BULK_PARALLEL, DEBUG, EXPERIMENTAL_FEATURES, EXPERIMENTAL_NUMSCRIPT_INTERPRETER
- Config files: examples/standalone/docker-compose.yml
- Prompt files: none
- Accounts you'll need: Formance Cloud account (enterprise deployments only)

## Operable: what an agent can drive

Operability: official. Interface: api at https://docs.formance.com/ledger (published by the builder, both).

### Reach (partial coverage)

- Create ledgers and buckets: reachable. openapi.yaml paths /v2/{ledger}, /v2/_/buckets/{bucket}
- Post multi-posting transactions: reachable. POST /v2/{ledger}/transactions with postings; README quickstart
- Run Numscript scripts: reachable. transactions accept a script body; Numscript DSL documented at docs.formance.com/modules/numscript
- Read accounts, balances and volumes: reachable. openapi.yaml /v2/{ledger}/accounts, aggregate balances and volumes endpoints
- Attach metadata to accounts and transactions: reachable. openapi.yaml /v2/{ledger}/accounts/{address}/metadata
- Revert transactions: reachable. revert endpoint in v2 API
- Bulk operations: reachable. openapi.yaml /v2/{ledger}/_bulk
- Audit logs: reachable. logs endpoints; README mentions shipping logs to replica stores
- Export to analytics stores: reachable. openapi.yaml /v2/_/exporters, pipelines
- Console UI: not reachable. the Console is a separate UI in the standalone compose, not part of the API

## Code stack

- Languages: Go
- Frameworks: none
- Package manager: go modules
- Database: PostgreSQL
- Hosting target: Docker, Kubernetes (Formance operator)

## Evidence and confidence

- formFactor: HTTP service with OpenAPI (openapi.yaml in repo); no end-user UI beyond the Console (confidence 0.9)
- executionModel: no model at runtime (confidence 0.95)
- operability: docs.formance.com/ledger and SDKs published by Formance; openapi.yaml in repo (confidence 0.9)
- effort: examples/standalone/docker-compose.yml env keys; cmd/serve.go flags bind, auto-upgrade, bulk-parallel (confidence 0.8)
- editions: formance.com/pricing: Open Source MIT free, Enterprise annual subscription (confidence 0.85)
- active: GitHub pushedAt 2026-09-03
- reach:  (confidence 0.8)

## Open questions

- SDK language list (docs page is JS-rendered; not fetched)
- Auth configuration for the standalone service (AUTH_ENABLED or similar) was not confirmed

## Sources

- https://github.com/formancehq/ledger (sourcing:invoicing-finance:curated)
- https://www.formance.com/pricing (analysis:invoicing-finance)
- https://github.com/formancehq/ledger/blob/main/openapi.yaml (analysis:invoicing-finance)
