Transactions

Move money in one balanced call.

A transaction is a set of postings whose debits always equal its credits. Send a simple transfer or split one payment across many accounts, pending or posted, and Ledgr writes it to an immutable journal and updates every balance atomically.

One request

Post a payment, fee, and payout together.

List the legs, and Ledgr checks that debits equal credits before it accepts anything. The transfer, the platform fee, and the merchant credit settle as one atomic entry, or none of them do.

settlement.ts
const tx = await ledgr.transactions.create({
idempotencyKey: "settle_5f2a",
description: "Card settlement",
status: "posted",
entries: [
{ account: "customer", direction: "debit", amount: 10_000 },
{ account: "merchant", direction: "credit", amount: 9_700 },
{ account: "fees", direction: "credit", amount: 300 },
],
});
tx.status; // "posted" · debits === credits
Journaltxn_5f2a1c
Customer
Debit$100.00
Merchant
Credit($97.00)
Platform fees
Credit($3.00)
Net movement$0.00 balanced

Three legs, one entry. Debits and credits net to zero, so the books can never drift.

Double-entry, enforced

Correct by construction, not by convention.

Double-entry is centuries old for a reason. Ledgr enforces it at write time, so the property you rely on for audits holds on every single transaction.

Debits equal credits

Every transaction is rejected unless its sides balance. Money always leaves one account for another, so value is never lost or invented.

Atomic by default

Either the whole entry is written or none of it is. A partial settlement is impossible, even across many accounts.

Traceable forever

Each posting links to the transaction that made it. Any balance can be explained by the exact entries behind it.

Lifecycle

Authorize now, settle when you are ready.

Post a transaction outright, or record it as pending and reserve the payer's funds until you confirm it. Corrections are first-class too: a reversal is a new, opposite entry, never an edit. Ledgr enforces which transitions are allowed.

pendingRecorded and reserved, not yet settled.
postedSettled. Balances move.
reversedUndone by an equal, opposite entry.
Built in

Everything a money movement needs.

01

Multi-leg entries

Split one payment across payer, payees, fees, and taxes in a single balanced transaction.

02

Idempotent writes

Every create takes an idempotency key. A retry after a timeout returns the original result and never double-posts.

03

Real-time balances

Posted, pending, held, and available update the moment a transaction lands, derived straight from the journal.

04

Rich filtering

List by account, status, direction, or date range, and page through results with a stable cursor.

05

Full group detail

Retrieve any transaction with its legs, its immutable postings, and its complete event history.

06

Events on every change

transaction.created, posted, and reversed events reach your webhooks the instant they happen.

In the dashboard

Every transaction, fully traceable.

The same entry you post through the API, with its legs, postings, and status, laid out for your team to inspect and reconcile.

A posted transaction in Ledgr

Post your first transaction today.