Ledgers
A tenant has one ledger per currency.GET /v1/ledgers lists them, with their scale, the account modules on, and totals per account group. An account can only be opened in a currency that has a ledger, otherwise the answer is LEDGER_MISSING.
Account modules decide which internal accounts a tenant has: lending adds the loan accounts, for example. GET /v1/account-modules is the catalogue with what is on, and GET /v1/internal-accounts lists your non-wallet accounts. A tenant admin switches a module on from the console, and a second person approves.
Account codes
Every account has a code in the formTYPE:GROUP:CCY[:PARTY].
Some common groups:
Codes are unique on a tenant, and a repeat gets
ACCOUNT_EXISTS.
Which accounts are balance-checked
Three groups can never go below zero:WAL holds customer money, and LON and INT are what a borrower owes. A posting that would take one below zero is refused with INSUFFICIENT_FUNDS, whichever endpoint it comes through, and a database constraint enforces it. Anything else can go either way, because settlement and internal accounts have to move in both directions. Reconciliation is what checks those.
Balances
pending counts both directions, while available is reduced only by what takes money out. A pending credit shows in pending and adds nothing to available until it posts.
GET /v1/accounts/{account_id}/postings is an account’s history, with balanceAfter on each line.
Status
An account isACTIVE, FROZEN or CLOSED. Freezing needs a person and a second person: see Approvals. A frozen account refuses postings with ACCOUNT_FROZEN.