docs
/
AppEngine API

Accounts and ledger

Deposit accounts from opening to close, holders, holds, freezes and dormancy, statements and check stops, fees and adjustments, products, and the double-entry ledger with its books, trial balance, journal entries and aging.

Every account at the bank is a banking_account, and so is each of the bank's own books. Money never changes an account directly: it moves as a banking_transaction posted as banking_entry lines whose debits equal their credits. This page covers the staff routes for accounts, products and the general ledger. Amounts are whole cents everywhere (1250 = $12.50); rates are basis points.

Auth in the blocks below: staff is a signed-in staff person or an org API key whose scopes cover the call. After the · come the modules (/banking/<module>) whose grant opens the route. See Overview for how module grants work. Routes marked approval go through maker-checker, explained in Approvals. They answer { status: "done", result } when no second person is needed, or { status: "pending", approvalId, approvers } when one is.

Accounts

GET/banking/accountsSTAFF
GET/banking/accounts/:idSTAFF
POST/banking/accountsSTAFF
POST/banking/accounts/:id/try-openSTAFF
POST/banking/accounts/:id/kybSTAFF
POST/banking/accounts/:id/numberSTAFF

GET /banking/accounts lists customer accounts. The bank's own books are never in it. Filters:

QueryMatches
statuspending, open, frozen, dormant, closed
customera holder's customer sk
accountNumberthe exact number
kindchecking, savings, money_market, certificate, loan; deposit means every kind but loan
product, holderTypethe product sk; individual or business
qthe nickname, the business's legal name or DBA, holder name/email/phone/company (every typed word must appear), and, for 3 or more digits, the end of the account number
sort, sortTypecreatedate (default), openedAt, postedBalance, accountNumber, nickname, status; asc or desc (default)

It returns { total, data }, paged with page and pageSize.

GET /banking/accounts/:id returns { account, kyc, openingGaps, holds, cards }:

  • kyc lists each holder who must be verified, with their customer_kyc status (not_started when there is none).
  • openingGaps is filled only for a pending account.
  • holds lists the active holds, up to 100.

What an account looks like in a response. Staff read it masked:

  • the account number is ••••1234;
  • a business's EIN shows as ••-•••1234, or On file;
  • the ledger bookkeeping fields (appliedKeys, postingReceipts, holdEffects, initialHeldCredits, checkStops) are left out.

Each account carries data.balances:

FieldMeaning
postedWhat has settled
heldWhat active holds keep back
availableposted − held
spendableavailable plus the overdraft limit
overdraftLimitThe account's own overdraft.limit. When it has none, the product's limit applies, but only if the product allows overdraft.
currencyThe account's currency

Showing the full number. POST /banking/accounts/:id/number returns { accountNumber }. It works for the Accounts module only. Every reveal is written to the account's activity log before the number is returned, and if that write fails the number is not shown. The bank's own books have no number to reveal; they answer 404.

Opening

POST /banking/accounts takes:

{ "product": "<banking_product sk or name>", "holders": [{ "customer": "<sk or email>", "role": "primary", "ownershipPercent": 100 }], "nickname": "Bills", "business": { "legalName": "…", "ein": "…" } }

It returns { account, gaps }. The account starts as pending and opens as soon as nothing is in the way, so the same call may hand back an open account. The rules:

  • Banking must be set up. If the bank name, sponsor bank, routing number or ACH company is missing, the call is refused with 409 Banking isn't set up yet: ….
  • The product must be active. A draft or retired product isn't open for new accounts.
  • Holders. There is exactly one primary; add the others as joint. Each holder is found by customer sk or email, and must already be a customer. Roles: primary and joint own the money; authorized_user can use it; beneficial_owner and controller are the people behind a business; beneficiary is paid on death.
  • Business accounts. Sending business makes a business account, and business.legalName is then required. A product's holderType (individual, business or any) must fit the account. The EIN is stored encrypted and kybStatus starts at pending.
  • The number is the Banking Config accountNumberPrefix, then random digits up to 11, then a Luhn check digit, so a mistyped number fails before it is looked up.
  • A certificate gets its term (startsOn, maturesOn) from the product's term.months.

What has to pass before it opens. Every primary, joint, controller and beneficial_owner must have a verified customer_kyc. A business account also needs business.kybStatus: verified. Each missing item comes back as a sentence in gaps. Call try-open again at any time: it opens the account when the gaps are gone and returns { account, gaps }, and an account that isn't pending is returned as it is.

POST /banking/accounts/:id/kyb with { status: "pending" | "in_review" | "verified" | "rejected" } records the business verification. It works on business accounts only, and then tries to open the account.

Account state

POST/banking/accounts/:id/freezeSTAFF
POST/banking/accounts/:id/unfreezeSTAFF
POST/banking/accounts/:id/blockedSTAFF
POST/banking/accounts/:id/statement-daySTAFF
POST/banking/accounts/:id/closeSTAFF
POST/banking/accounts/:id/holdersSTAFF
POST/banking/accounts/:id/overdraftSTAFF
StatusWhat it means
pendingWaiting on KYC/KYB. Can't be frozen, can't be debited, can't receive money.
openNormal use.
frozenNothing leaves. Credits still land.
dormantMarked by the end-of-day run (below). Nothing leaves until it is reactivated.
closedFinal. Receives nothing.
  • Freeze: { reason, note }. The reason is customer_request, compliance, legal_order, fraud, deceased or other, and is kept in data.freeze with who and when. A pending or closed account can't be frozen.
  • Unfreeze always goes through the dormancy_reset action. Lifting a freeze is exempt and runs at once. Bringing back a dormant account needs a second person, because dormant accounts are a fraud target. Either way the account returns to open.
  • Blocked: { blocked: [...] } with any of debits, credits, cards, external_out. This limits the account short of a freeze; the list sent replaces the current one.
  • Statement day: { day } from 1 to 28, so every month has it. It applies to customer deposit accounts only, not to a closed account, and a change is written to the activity log.
  • Close: { reason }, where customer_request is the default.
    • The posted balance must be zero, nothing may be held, and no payment on the account may be pending or in_review. Otherwise you get 409 with the amount or reason, e.g. Move the $12.00 out first; an account closes at a zero balance.
    • The account's live cards close with it.
    • Closing an account that is already closed returns it unchanged. The bank's own books don't close.
  • Holders (approval holder_change): { customer, role, remove?, ownershipPercent? }.
    • Adding someone as primary turns the current primary into joint.
    • The primary holder can't be removed; make another holder primary first.
    • The account must keep a primary or joint holder.
    • The approval summary names the person, e.g. Add Ana Ruiz to ••••4821 as joint.
  • Overdraft opt-in: { optedIn: true | false } records the holder's Reg E choice on card and ATM overdrafts, given at a branch or on a call. It returns the account.

Dormancy. The end-of-day job marks an open customer account dormant when the holder hasn't used it for Banking Config dormantAfterDays (365 by default), counted from lastActivityAt, or from openedAt when there has been no activity. The bank's own bookings (fees, interest, journal entries) don't count as use.

Holds

POST/banking/accounts/:id/holdsSTAFF
POST/banking/holds/:id/releaseSTAFF

A banking_hold keeps money back: it raises heldAmount and lowers available.

Placing a hold. A staff hold takes:

{ "amount": 50000, "reason": "legal_order", "note": "Levy 24-118", "expiresAt": "2026-12-31T23:59:59Z", "idempotencyKey": "levy-24-118" }
  • reason is legal_order, compliance, dispute or other.
  • It is placed whatever the balance: the available balance is not checked, so a legal order can hold money that isn't there yet.
  • idempotencyKey is required (Send a stable request key before placing this hold.). The same key with the same terms returns the same hold. The same key with different terms is a 409.

Holds the bank places itself. A card authorization or a pending payment places a hold that the available balance must cover; when it can't, the hold is refused with the same Not enough available message as a posting. A deposited check's hold is placed with the deposit, following Reg CC as worked out at the teller window; see Teller and cash.

Hold statuses:

  • active: money is held.
  • released: it went back to available.
  • captured: the money left with the transaction it was for.
  • expired: it reached its expiresAt. The end-of-day run releases lapsed holds as expired.
  • pending and releasing: in progress.

Releasing early (approval hold_waiver) needs an active hold. It returns { released: true | false }, where false means the hold had already ended. By default a second person is needed above $25.00 (over: 2500).

Statements and check stops

GET/banking/accounts/:id/statementsSTAFF
GET/banking/accounts/:account/statements/:id/pdfSTAFF
POST/banking/accounts/:account/statements/:id/emailSTAFF
GET/banking/accounts/:id/check-stopsSTAFF
POST/banking/accounts/:id/check-stopsSTAFF

How statements are made. The end-of-day job writes a banking_statement on each deposit account's statement day. In order, it charges the period's product fees, pays the accrued interest, then writes the statement, so the statement shows both. Each statement is keyed to its period, so a re-run never repeats one.

A statement holds:

  • periodStart, periodEnd, openingBalance, closingBalance;
  • credits, debits and their counts;
  • interestPaid, feesCharged, averageDailyBalance;
  • status (ready or sent).

Listing them. GET …/statements returns them newest period first: 60 by default, or paged with page/pageSize.

The PDF. …/pdf downloads the statement as an attachment.

  • It is rebuilt from the account's ledger lines for the period, and it is refused when those lines no longer add up to the saved figures: 409, Statement activity does not reconcile with the saved period.
  • It shows the account number masked and the bank's name and logo. It never shows the organization's EIN or settings.

Emailing it. …/email with { customer? } sends the PDF to an owner (primary or joint). With a single owner, customer may be left out. The PDF is queued through the notification outbox, and the call returns { status: "queued", messages: [{ id, status }], customer }. A customer without a valid email is refused.

Holders get their own statement PDF at GET /client/banking/accounts/:account/statements/:id/pdf; see the client API.

Check stops are bank-reviewed instructions not to pay an on-us check.

  • GET returns { total, bankBusinessDate, data }. Each stop is marked expired and effective against the bank's business date, in its time zone.
  • POST takes { operation: "place", checkNumber, effectiveDate?, expiresOn, reason } or { operation: "release", id, reason }.

The rules:

  • expiresOn is the inclusive last day. It must come from the bank's stop-payment policy; nothing defaults it.
  • effectiveDate defaults to today.
  • reason is 1 to 1000 characters.
  • A check number is 1 to 20 letters, digits or hyphens. Leading zeros on an all-digit number are ignored.
  • A stop that overlaps an active stop on the same check is a 409; release the old one first.
  • An account keeps at most 2000 stop instructions.
  • Only accounts that are neither pending nor closed take stops.

While a stop is effective, the ledger refuses to pay that check: 409, Check 1042 has an active stop instruction and cannot be paid. The check is tested in the same update as the debit.

Fees, adjustments and transactions

GET/banking/transactionsSTAFF
GET/banking/transactions/:idSTAFF
POST/banking/accounts/:id/feesSTAFF
POST/banking/accounts/:id/adjustmentsSTAFF
POST/banking/transactions/:id/refund-feeSTAFF

Listing transactions. GET /banking/transactions filters by:

  • account: the account sent or received the money;
  • status, kind, rail, direction.

It returns { total, data }, newest first. GET /banking/transactions/:id returns { transaction, entries }, the transaction with its ledger lines. Sending, cancelling and reversing payments are on Payments, cards and disputes.

Charging a fee. POST …/fees takes { amount, description, idempotencyKey? } and posts a fee that debits the account and credits fee_income. A fee is the bank's own booking:

  • It posts whatever the account's state or balance, so it can overdraw.
  • It doesn't count as the holder using the account.
  • A repeated idempotencyKey returns the first fee.

Adjusting an account (approval adjustment) takes { amount, direction: "in" | "out", description }.

  • It corrects a customer account against the suspense book, and description appears on the statement line.
  • It posts whatever the account's state.
  • By default it always needs a second person, from DepositOps, BranchManager, Controller or Owner.

Refunding a fee (approval fee_waiver) takes { reason }.

  • It reverses a posted fee; nothing else is refunded this way.
  • By default a second person is needed above $25.00.

Products

POST/banking/productsSTAFF
PUT/banking/products/:idSTAFF

Products are banking_product (deposit) and banking_loan_product (lending) records. They are written only through these routes, not through the generic repository.

Creating a product. POST takes { datatype?, data: { title, name?, kind, … } }.

  • It always creates a draft.
  • title is required. name defaults to the title, made lowercase with hyphens, and must be unique (409 otherwise).
  • datatype is banking_product (the default) or banking_loan_product.

What a deposit product carries:

  • kind: checking, savings, money_market or certificate.
  • holderType and currency.
  • status: draft, active or retired.
  • interest: rateBps or tiers, accrued daily, paid out monthly, quarterly or at_maturity, with an actual_365 or actual_360 day count.
  • term, for a certificate: months and atMaturity (renew or hold).
  • minimumBalance, withdrawalsPerMonth.
  • overdraft: allowed, limit, optInRequired.
  • fees[], each with code, trigger, amount, percentBps, waiveAtBalance, maxPerDay.
  • limits, cards and a disclosure link.

Changing a product. PUT takes { changes: { …fields }, datatype? }. Every change goes through product_change, including the change that makes a draft active, which is how a product reaches customers.

  • name can't be changed.
  • An identical change already waiting from the same maker returns that request rather than a second one.
  • By default it needs ComplianceOfficer, Controller or Owner.

Deposit operations

GET/banking/deposit-opsSTAFF
GET/banking/deposit-ops/:queueSTAFF
POST/banking/customers/:customer/disputesSTAFF

GET /banking/deposit-ops gives the counts for the desk:

  • today, overdrafts, holdsExpiring, cdMaturities, dormant, escheatDue;
  • endOfDay: { lastRun, status, failed, nextRun, enabled };
  • statements: { lastPeriodEnd, lastCount };
  • unavailable. A count that can't be read is null and named in unavailable, never shown as 0.

GET /banking/deposit-ops/:queue returns one queue, paged. q narrows it by account number (or its last digits), nickname or business name.

QueueWhat it lists
overdraftsAccounts overdrawn now, or charged an overdraft or NSF fee in the last 30 days. Lowest balance first, with overLimitBy, optedIn, and NSF and overdraft fee counts and amounts.
holds-expiringActive holds ending within 3 days, or already past and waiting for tonight's run, with daysLeft. Someone who can't open Monitoring sees a compliance hold as other, without its note or who placed it.
cd-maturitiesCertificates maturing in the next 30 days, with rate, accrued interest, early-withdrawal penalty days, and noticeDueBy / noticeOverdue. The notice is due 30 days before maturity for an auto-renewing term longer than a month (Reg DD).
dormantDormant accounts and where each stands toward escheat (dormant, due_diligence, reportable, or unavailable with the reason). It uses only the bank's reviewed escheat policies and each account's explicitly assigned jurisdiction. ?escheat=1 keeps only those past dormant.
end-of-dayThe banking-end-of-day and banking-ach-cutoff runs, newest first, with their schedule, what each processed, and its errors. ?job= picks one job, ?failed=1 keeps runs with failures.
statementsOne row per statement period end, with counts and totals; q takes a year or month. With ?periodEnd=YYYY-MM-DD, the statements of that run.

POST /banking/customers/:customer/disputes files a Reg E dispute for a customer who called or came in, so the clocks start now. It takes { transaction, reason, amount?, description }. The customer is found by sk or email, and the transaction must be on an account they hold. Disputes are covered in Payments, cards and disputes.

The ledger

How a posting works.

  • A banking_transaction is posted as two or more banking_entry lines: transaction, account, side, amount, currency, balanceAfter, effectiveDate, postedAt. Every amount is a whole number of cents above 0.
  • Debits must equal credits, or the posting is refused. Lines are written once and never changed; a correction is a new transaction, such as a reversal that swaps every line.
  • Each line moves its account's posted balance in one conditional update. The account's state, its available balance and this line hasn't been applied are all in the same filter. So two requests at the same moment can't both spend the last of a balance, and a retry can't post twice.
  • The side that can be refused, money leaving a customer account, goes first. If a later side is refused, the sides already applied are undone before the error is returned.

Which way balances move. Customer deposits are what the bank owes, so a credit raises them. A loan account is what the borrower owes, so a debit raises it.

When a posting is refused. Money leaving a customer account must find it open, not blocked for debits, and with enough spendable. Money arriving must find it neither closed nor pending, and not blocked for credits. The refusals say what to do:

StatusMessage
409Account ••••4821 is frozen. Money can't leave it until the bank lifts the freeze.
409Account ••••4821 is dormant. The holder needs to contact the bank to reactivate it.
409Account ••••4821 isn't open yet. / …is closed. / …is closed and can't receive money.
409Money can't leave account ••••4821 right now. Contact the bank. (blocked for debits)
422Not enough available in ••••4821: $40.00 available, $55.00 needed.
503code: POSTING_RECOVERY_REQUIRED: the posting may have committed and the answer was lost. Check the existing transaction; don't send a replacement.

One currency per posting. The books are kept per currency. The dollar books are GL-<CODE>; another currency's are GL-<CODE>-<CURRENCY>, made on first use. A posting runs in its customer accounts' currency, and the book sides move to that currency's books. Moving money between accounts in two currencies is refused with 422: converting between currencies is not set up.

Books and ledger reads

GET/banking/booksSTAFF
GET/banking/ledger/checkSTAFF
GET/banking/ledgerSTAFF
GET/banking/ledger/booksSTAFF
GET/banking/ledger/trial-balanceSTAFF
GET/banking/ledger/accounts/:id/entriesSTAFF
GET/banking/ledger/agingSTAFF

Every route takes ?currency= (default USD).

The bank's books are banking_account records with holderType: bank, one per systemCode:

GroupBooks
assetsettlement_ach, settlement_wire, settlement_rtp (instant payments), settlement_card, settlement_check, teller_cash, vault_cash, loans_receivable
liabilityofficial_checks (outstanding)
incomefee_income (deposit fees), interest_income, fee_income_loans
expenseinterest_expense (deposits), losses, cash_over_short, charge_offs
clearingsuspense, loan_suspense
fundingfunding

Settlement, cash, loans receivable and expense books are debit-normal. The rest are credit-normal.

  • GET /banking/books returns [{ code, sk, balance, currency }].
  • GET /banking/ledger/books adds each book's accountNumber, label, group, normalSide, and aged (whether it can be aged).
  • GET /banking/ledger/check sums every line posted in the currency: { debits, credits, lines, balanced }. It reads stored ledger days, plus today and any changed days worked out live. When some days couldn't be read, a note says so.
  • GET /banking/ledger returns { currency, currencies, check, books }. currencies lists every currency the bank holds accounts in, dollars first, and check also carries the difference.
  • GET /banking/ledger/trial-balance, with an optional asOf=YYYY-MM-DD (no later than today), builds each balance from the lines effective on or before that date.
    • Each book is a line of its own. Customer accounts are summed by kind, with credit balances and overdrawn debit balances kept apart.
    • It returns { asOf, currency, currencies, today, basis, lines, totals: { debit, credit, difference, balanced } }. Each line has label, kind (book or customer), group, normalSide, accounts, lines, debit, credit and balance.
    • With no asOf, every line is also compared with the balance on the account records (recordedBalance, difference), and the answer adds recordsMatch and mismatched.
  • GET /banking/ledger/accounts/:id/entries returns the lines on one account (a book or a customer account), newest first. It takes optional from/to effective dates and paging, and names each line's transaction reference, kind and description, and whether it was a journal entry. A customer account's number is masked.
  • GET /banking/ledger/aging ages a suspense or clearing book: ?book= is suspense (the default), loan_suspense or a settlement_* book.
    • Lines carry no matching key, so items are aged first in, first out: the balance is made of the newest lines on the side it leans to, and older lines are taken as cleared.
    • It returns { book, today, method, buckets, unexplained, truncated, total, data }. The buckets are 0–30, 31–60 and 61–90 days, then over 90. It walks at most 5000 open items; past that, truncated is true.

Journal entries

POST/banking/ledger/journalSTAFF
GET/banking/ledger/journalSTAFF
GET/banking/ledger/journal/:idSTAFF

A manual journal entry moves money between the bank's own books only. To correct a customer account, use an adjustment.

{ "description": "Reclass ACH suspense", "effectiveDate": "2026-11-27", "reference": "JE-1120", "lines": [
  { "account": "suspense", "side": "debit", "amount": 12500, "memo": "…" },
  { "account": "settlement_ach", "side": "credit", "amount": 12500 } ] }

The rules:

  • Each line's account is a book code or the sk of one of the bank's own accounts, such as a drawer's cash account.
  • An entry has 2 to 50 lines, each a whole number of cents above 0, marked debit or credit.
  • Debits must equal credits. The refusal says by how much and which side is over.
  • description is required; it is kept on the ledger. reference is cut to 60 characters and memo to 200.
  • effectiveDate defaults to today. It can't be after today, and can be back-dated by at most a year.

Posting and approval. The entry posts as one banking_transaction (kind: adjustment, rail: book, metadata.journal: true) with its lines. By default it needs a second person, from Controller or Owner.

Reading entries.

  • GET /banking/ledger/journal?status= lists them: posted (the default), waiting (approval pending), or not_posted (rejected, failed or cancelled), paged.
  • GET /banking/ledger/journal/:id takes a transaction sk (posted) or an approval sk (waiting or not posted). It returns the entry with each line's account named, plus its debits and credits totals, its status, and who asked and decided.

Datatypes

banking_account, banking_product, banking_hold, banking_entry, banking_statement, banking_transaction. All are written only by the Banking module; generic repository writes to them are refused. See Overview.