Pandabase
Ledger

Ledger overview

How Pandabase tracks your money, and how to use ledgers in your own application.

Ledger is in alpha. There are no Ledger fees during alpha.

Pandabase uses ledgers internally to keep track of your money. A ledger records changes to balances so each amount can be traced back to the entries that explain it.

You can also use Ledger in your own application to track balances, reserve funds, and record settlements. It records the movement of money between accounts. Your application and payment providers handle the actual bank, card, or blockchain transfers.

Ledger is built on Astrum, our open-source double-entry ledger core. The repository includes API documentation and examples.

How it works

Each account tracks a balance in one currency. A transaction records a change through two or more entries, each of which debits or credits an account.

The total debits and credits must match in each currency. This is called double-entry accounting. Instead of overwriting a balance, you add entries that explain why it changed. The posted balance comes from posted entries; pending transactions and holds also affect what's available.

For example, a USD wallet with $50 posted and a pending $15 withdrawal has $35 available. The ledger keeps the posted balance and the reserved amount separate until the withdrawal is posted or canceled.

Terms used in these guides

ConceptWhat it is
LedgerA group of accounts that can transact with each other. Transactions can't cross ledger boundaries.
AccountHolds one currency. Its normal side decides which entries increase its balance.
TransactionA balanced set of 2–1,000 entries. Can be pending, posted, or archived.
EntryA single debit or credit to one account.
HoldA reservation of available funds that you capture, void, or let expire.
Scheduled transactionA transaction that runs at or after a given time.
StatementA saved snapshot of an account's balances and entries for a period.
SettlementRecords the net unsettled amount against another account, called the contra account.
Account categoryGroups account balances into totals, with up to seven levels of categories.
Balance monitorEmits an event when an account's balance crosses a condition.
EventA snapshot of a change, delivered to your webhook endpoints.

Amounts, dates, and IDs

  • Amounts are integer minor units as strings, up to 38 digits. "100" is USD 1.00. Entry, hold, and capture amounts must be positive; balances can be negative.
  • Times are RFC 3339 strings, such as 2026-09-01T00:00:00Z.
  • IDs carry a resource prefix, such as ldg_ for ledgers, acct_ for accounts, and txn_ for transactions.
  • Metadata is a JSON object up to 16 KiB for your own attributes. Updates merge: keys you omit stay, and a key set to null is removed.

Use Closing periods to prevent changes to a period you've already reported on. Use Events and webhooks to notify your application when ledger records change.

Astrum's repository also includes examples for marketplaces, wallets, usage-based billing, and card authorizations.

Last updated on

On this page