The staff lending API: loan applications from intake to booking, booked loans and their servicing, and collections. Every route here is @StaffOnly and also takes an org API key whose scopes cover the call. Loans routes need the /banking/loans module and collections routes need /banking/collections, as the caller's role menu grants them (see Staff access).
Money is whole cents and rates are basis points throughout (950 = 9.50%). An amount that is not a whole number of cents is refused with Send amount in cents, as a whole number (1250 = $12.50).
Protected steps go through maker-checker. They answer { status: 'done', result } when they run now, or { status: 'pending', approvalId, approvers } while they wait for a checker. The lending actions and their default approver roles (Banking Config approvals can change them):
| Action | What it protects | Default approvers | Runs without approval at or under |
|---|---|---|---|
loan_decision | A decision over the decider's lending authority | Underwriter, BranchManager, Owner | — |
loan_booking | Booking an approved application | LoanProcessor, Underwriter, BranchManager, Owner | — |
loan_disbursement | Paying the loan out | LoanProcessor, BranchManager, Owner | $25,000 (2500000) |
loan_fee_waiver | Waiving a fee or late fee | LoanServicer, BranchManager, Owner | $25 (2500) |
loan_modification | A rate, term or due-date change | Underwriter, BranchManager, Owner | — |
charge_off | Charging a loan off | Controller, BranchManager, Owner | — |
loan_autopay | Turning on a borrower's signed autopay | Owner, BranchManager | — |
Customers apply for loans, read them and pay them through /client/banking/loans, and set up autopay there; see Client identity and loans.
Loan products
/banking/loans/productsSTAFF/banking/productsSTAFF/banking/products/:idSTAFFGET loans/products is the picker: ?q (title), ?status (default active) → { total, data: [{ sk, title, category, type, consumer, secured, holderType, amount, rate, … }] }.
A loan product (banking_loan_product) is made and changed with the bank's product routes, passing datatype: 'banking_loan_product'. POST products always saves a draft; it reaches applicants only when a change to active is approved through PUT products/:id (maker-checker product_change). Only an active product takes applications: That product isn't taking applications. Make it active in Products first.
What a product holds, and how lending uses it:
| Field | Used for |
|---|---|
type | installment or line_of_credit. A line of credit is charged off at the open-end days. |
holderType, consumer, secured, collateralTypes | A business product needs the business named; a secured one needs collateral; consumer (default true) turns on the MLA check. |
amount.minimum / maximum / minTermMonths / maxTermMonths | Checked when the application is completed and again at decision. |
rate.rateBps, minRateBps, maxRateBps | The base rate a decision starts from, and the range pricing may set. |
dayCount | actual_365 (default), actual_360, 30_360. |
schedule | level_payment (default), equal_principal, interest_only, balloon (needs amortizationMonths, longer than the term). |
frequency | monthly (default), biweekly, weekly. |
graceDays | Days after a due date before the late fee; empty uses Banking Config lending.lateFeeGraceDays (15). |
fees[] | origination (flat, or percentBps of the loan, held to maximum; financed adds it to principal) and late (flat, or percentBps of the installment, held to maximum). |
allocationOrder, overpayment | How a payment is applied (see Payments). |
authority[] | { role, maxAmount }: who may approve how much (see Decision). |
A booked loan copies the terms it was approved on, so a later product change never moves it.
Applications
/banking/loans/pipelineSTAFF/banking/loans/applicationsSTAFF/banking/loans/applicationsSTAFF/banking/loans/applications/:idSTAFF/banking/loans/applications/:idSTAFF/banking/loans/applications/:id/completeSTAFF/banking/loans/applications/:id/stageSTAFF/banking/loans/applications/:id/creditSTAFFStages. draft → complete → verification → underwriting → approved or countered → closing → booked. An application also ends declined, withdrawn or incomplete. A booked, declined or withdrawn application can't be changed (409).
pipeline → { today, stages: [{ stage, count, amount }], awaitingDecision, nearRegB, overdue, noticesDue }. nearRegB counts undecided applications whose Reg B date is within 5 days; overdue counts those past it, plus unsent notices past their due date.
GET applications, paged (default 25): ?status (comma list), ?q (application number, business name, or an applicant's name, email or phone, every word matching), ?product, ?officer, ?customer, ?clock=adverse_action (Reg B date within 5 days, or a notice not sent), ?sort=created|regBDueBy|amount|status|number, ?sortType=1 for ascending → { total, data: [{ sk, number, status, borrower, product, amount, termMonths, officer, completedAt, regB, createdate }] }.
POST applications starts one in draft:
{
"product": "<loan product sk>",
"parties": [{ "customer": "<customer sk>", "role": "borrower", "income": { "grossMonthly": 650000 }, "consents": { "creditPull": "2026-11-20T10:00:00Z" } }],
"request": { "amount": 1500000, "termMonths": 36, "purpose": "Car", "firstPaymentDate": "2027-01-05" },
"collateral": [], "business": null, "linkedAccount": "<deposit account sk>", "channel": "branch", "officer": "[email protected]"
}customer alone (instead of parties) makes that customer the borrower. A party is a borrower, co_borrower, guarantor or cosigner, and one must be the borrower. A party keeps only customer, role, income, employment, housingPayment, liabilities, consents (creditPull, esign, tcpa) and mla; anything else sent is dropped, so the application never collects a prohibited basis (Reg B 1002.5). The application number is 8 random uppercase characters. An online application has no officer until one is assigned; otherwise the officer defaults to the caller.
GET applications/:id returns the record with view: product, borrowerName, linkedAccount (number masked), regB ({ kind: 'decision' | 'notice', dueBy, daysLeft, overdue }), gaps: { complete[], booking[] }, authority: { limit, role } for the caller, schedulePreview (once decided: principal, origination fee, payment, count, first payment, maturity), stages, reasonOptions and vendorGaps.
PUT applications/:id changes an open application: request, parties, collateral, business, linkedAccount (must be an open deposit account an applicant holds as primary or joint), supportingDocuments (up to 100, each an already uploaded file path), disbursement ({ method: 'deposit' | 'payee', counterparty, rail: 'ach' | 'wire' }), verification, officer, channel, location. Once decided, the requested amount can't change: The request is decided. Change the decided terms with a new decision instead. Credit data on a party is kept; it is changed only on the credit route.
After every create or change the server works out again, on the requested terms until decided and the decided terms after:
- Ratios (
ratios): DTI and PTI in basis points from borrowers' and co-borrowers' monthly income (verified, else gross), housing payment and liabilities not being paid off, plus the new payment; LTV from collateral values; DSCR ×100 from the business's net operating income over existing debt service plus a year of payments. - Reg O (
insider): whether a party is on Banking Configlending.insiders(or a related interest of one), their aggregate credit with this loan, and the board threshold (the greater ofinsiderBoardMinimumandinsiderBoardPercentBpsofcapitalAndSurplus; always aboveinsiderBoardAlways). An executive officer's general-purpose credit is held to the higher of 2.5% of capital or $25,000, never over $100,000. - MLA (
mlaCheck): on a consumer product with a covered borrower, the APR must not passlending.mlaMaprCapBps(3600).
complete marks it complete and starts the Reg B clock: regBDueBy is lending.regBNoticeDays (30) days later. It is refused with what is missing (Not complete yet: …): the amount and term inside the product's limits, each borrower's gross monthly income (individual products), the business's name (business products), and collateral (secured products).
stage { to, reason? }: verification or underwriting (only once complete and still undecided), closing (only approved, or a counteroffer accepted), withdrawn (needs a reason), incomplete (needs the reason, which the notice of incompleteness names).
credit records the bureau report by hand; no credit bureau is connected. { customer, bureau: equifax|experian|transunion, pullType: hard|soft, score?, scoreModel?, scoreRange?, keyFactors?, pulledAt?, consentAt? }. A hard pull needs the applicant's consent to the pull (FCRA permissible purpose), from consentAt or the party's consents.creditPull. A score is 300–900; at most 5 key factors. The record keeps permissiblePurpose: 'credit_application' and who entered it.
Decision
/banking/loans/applications/:id/decisionSTAFF/banking/loans/applications/:id/counterofferSTAFF/banking/loans/applications/:id/conditionsSTAFF/banking/loans/applications/:id/conditions/:indexSTAFF/banking/loans/applications/:id/board-approvalSTAFFdecision { outcome, amount?, termMonths?, rateBps?, riskGrade?, reasonCodes?, conditions?, note?, exceptions? } → { status, result | approvalId, application }.
outcomeisapproved,approved_with_conditions(needsconditions),counteredordeclined. Only a complete application incomplete,verificationorunderwritingis decided.reasonCodescome from the Reg B list (view.reasonOptions), at most 4. A decline or counteroffer needs at least one.otherneeds the specific reason innote.- Amount, term and rate default to the request and the product's base rate, and must sit inside the product's amount, term and rate limits. Terms that would put a covered borrower's MAPR over the MLA cap are refused.
- Lending authority. The decider's limit is the largest
authority[].maxAmountamong their roles (own and through groups). A product with no authority matrix, and Owners, ConfigAdmins and root roles, have no limit; a person with none of the listed roles has a limit of 0. A decline, or an amount within the limit, is decided now. Over it, the decision waits asloan_decision; approvers whose roles don't carry enough authority for the amount are left out of the tray, and the approver's own authority is checked again when they approve.
A decision saves decision (with decidedBy, decidedAt and the authority role), the reason codes, any conditions (as open), and the Truth in Lending figures tila: aprBps (actuarial method, Reg Z Appendix J), financeCharge, amountFinanced (principal less a prepaid origination fee), totalOfPayments, paymentAmount, paymentCount, firstPaymentDate. It also sets the adverse-action clock: a decline is due by the Reg B date, a counteroffer within lending.counterofferNoticeDays (90) days unless accepted.
counteroffer { accept: true | false } records the applicant's answer, once. Accepting clears the notice requirement.
Conditions. conditions { text } adds an open one. conditions/:index { status: cleared | waived | open, document? } clears, waives or reopens it, stamping who and when.
board-approval records Reg O prior approval: { approvedAt, reference, abstained?, comparableTerms: true }. It is refused unless a party is an insider, and comparableTerms must be true (the 215.4(a) attestation).
Adverse action
/banking/loans/applications/:id/adverse-actionSTAFF/banking/loans/applications/:id/adverse-actionSTAFF/banking/loans/applications/:id/adverse-action/pdfSTAFF/banking/loans/applications/:id/adverse-action/emailSTAFFGET builds the notice as it would go → { gaps, required, dueBy, sentAt, usedCreditReport, creditScore, keyFactors, bureau, reasons, text, vendorGap }. The text carries the bank's name and address, the action taken (the declined request, or the counteroffer's terms and APR), the principal reasons in the sample-form wording, the ECOA notice naming the bank's federal regulator, and, when a credit report was used, the FCRA §615(a) paragraph with the bureau's contact line and the credit score disclosure (score, range, date, model, up to 5 key factors). gaps lists what stops it going: no adverse action due, the bank name, lending.creditorAddress, lending.regulatorName and regulatorAddress. Once sent, the text is the one kept as sent.
POST records it sent: { channel: mail | email | in_person, sentAt? } (default mail). Refused when already sent, when a counteroffer is still unanswered, or when gaps is not empty.
pdf downloads the notice as a Letter PDF (marked draft until it is sent). email { customer? } queues it as a PDF attachment to a borrower or co-borrower's email; with one borrower the customer may be left out. It is refused while a counteroffer is open or while the notice has gaps, and answers { status: 'queued', messages, customer }.
Booking and disbursement
/banking/loans/applications/:id/bookSTAFF/banking/loans/:id/disburseSTAFFbook { linkedAccount? } asks for loan_booking with the approved terms as they stand, so the checker sees what is booked → { status, result: { loan, number, account } | approvalId, application }. While it waits, the application moves to closing. It is refused, with every reason, unless:
- the application is approved, in closing, or a counteroffer was accepted;
- every condition is cleared or waived;
- an insider over the Reg O threshold has board approval with the comparable-terms attestation, and an executive officer's general-purpose credit is within its limit (deposit or real-estate collateral excepted);
- on a consumer product, each borrower's MLA covered-borrower check is recorded, and the MAPR passes the cap;
- the payout deposit account is chosen (an open account an applicant holds), and a payee is chosen when paying on to one.
When approved, booking checks the terms are still the approved ones (The approved terms changed after booking was asked…), then:
- places a hold on a pledged deposit account (collateral of type
deposit), for the lesser of principal and the pledged value; a pledge the account can't cover stops the booking; - opens the loan's own
banking_account(kind: 'loan', debit-normal), with a 12-digit number starting8and a check digit, named for the product and loan number; borrowers become primary and joint holders; - creates the
banking_loan(status: 'booked', a 10-character number) with its terms, schedule and installments, grace days, late-fee rule, allocation order and origination fee.
A retried booking finds the loan already made for the application and returns it (replayed: true) rather than making a second one.
disburse pays a booked loan out, as loan_disbursement (amounts at or under the configured over run now). Ledger: Dr the loan account (principal), Cr the borrower's deposit account (principal less the origination fee), Cr loan fee income (the fee). The loan goes active, balances start at the principal, and the schedule is worked out again from today when the loan was booked on an earlier day (and always for a balloon). When the application's disbursement method is payee, the proceeds are then sent on from the deposit account to that payee by ACH or wire; a failure there comes back as onward: { failed } without undoing the payout.
Portfolio and servicing
/banking/loans/portfolioSTAFF/banking/loans/portfolio/summarySTAFF/banking/loans/:idSTAFF/banking/loans/:id/payoff-quoteSTAFF/banking/loans/:id/payoff/pdfSTAFF/banking/loans/:id/fee-waiverSTAFF/banking/loans/:id/modificationSTAFF/banking/loans/:id/flagsSTAFFportfolio, paged: ?status (default booked,active,arrears), ?bucket, ?accrual=accruing|nonaccrual, ?q, ?product, ?customer, ?officer, ?sort=dpd|balance|nextDue|number|status|created → { total, data: [{ sk, number, borrower, product, status, balance, principal, rateBps, nextDue, dpd, bucket, accrualStatus, flags }] }.
portfolio/summary → { buckets: [{ bucket, count, principal }], loans, principal, nonaccrual, awaitingDisbursement } over active and arrears loans. Buckets are current, 1_29, 30_59, 60_89, 90_119, 120_plus days past due, counted from the oldest unpaid due date.
GET loans/:id returns the loan with view: product, borrowers, the loan account and its posted balance, linkedAccount (masked), owed, ledgerMatches (the loan account's posted balance equals what the record says is owed), pastDue, payoffToday, schedule (each installment with payment and remaining), payments (with their split, and reversals), charges, chargeOff: { days, candidate }, actions (which servicing steps apply now) and vendorGaps.
Loan statuses: booked (not paid out), active, arrears (days past due above 0), paid_off, charged_off, closed. Installments read due, partial, paid, late or waived.
payoff-quote { goodThrough?, issuedTo? } (default today; never earlier) → { amount, principal, interest, fees, penalties, unapplied, perDiem, goodThrough, nonaccrual, letter }. The amount is principal + interest to the good-through date + fees + late fees − unapplied money; perDiem is one day's interest on the principal for a later date. A nonaccrual loan quotes no further interest. Each quote is logged on the loan (the last 20). payoff/pdf?date= downloads the letter as a PDF.
fee-waiver { installment?, amount?, component?: penalties | fees, reason } asks for loan_fee_waiver. With installment, it waives that installment's late fee; otherwise amount, or everything owed in the component (default penalties, the late fees). Ledger: Dr loan fee income, Cr the loan.
modification { rateBps?, payments?, nextDueDate?, amortizationMonths?, reason, financialDifficulty? } asks for loan_modification on an active or arrears loan. payments is how many are left after the change; nextDueDate (today or later) is an extension or deferral; amortizationMonths changes only a balloon loan. Paid installments stay; the unpaid ones are re-worked at the new rate, count and dates (re-amortized as level payments, or rebuilt as a balloon), and money already credited to a part-paid installment carries to the new first one. The change is kept in modifications[] with before and after figures; financialDifficulty marks it for the ASU 2022-02 disclosure.
flags { flag, on?, since?, note?, scra? } sets (default) or clears one flag: bankruptcy, scra, deceased, litigation, cease_contact, attorney_represented, fraud. The same route is at collections/loans/:id/flags.
bankruptcystops late fees and collection contact.scraneedsscra.serviceStart, and only covers a loan booked before service began. It caps the rate atlending.scraRateCapBps(600) from service start: posted interest above the cap since then is credited back (Dr interest income, Cr the loan), and the remaining payments are re-worked at the cap. Clearing it ends the cap today unless an end date is set.
Payments
/banking/loans/:id/paymentsSTAFF/banking/loans/payments/:txn/reverseSTAFF/banking/loans/:id/unappliedSTAFFpayments takes a payment by book transfer from a deposit account: { amount, from, holdUnapplied?, idempotencyKey? } → { transaction, allocation: { interest, principal, fees, penalties, unapplied, extraPrincipal, installmentCredit }, loan }. from is required (Choose the deposit account the payment comes from.), and a loan account can't pay another loan. A payment is taken only on an active or arrears loan: a booked loan isn't paid out yet, and a charged-off one takes a recovery instead.
The order of work:
- Interest is accrued to yesterday and posted, so the payment can take it.
- The payment is split by the loan's
allocationOrder(default interest, principal, fees, penalties). Fees and late fees only get what is left once the installment due is covered, wherever they sit in the order: a late fee never makes the installment short (no pyramiding, 16 CFR 444.4). - Money beyond the installment due and the charges goes to principal. With
overpayment: 'principal'it is a curtailment; withpaid_aheadit also counts toward the next installments. - Anything beyond everything owed is held unapplied in the loan suspense book. With
holdUnapplied: true, a payment smaller than what is due is held unapplied whole.
Installments are credited oldest first. When everything is paid the loan goes paid_off, a pledged deposit hold is released, the loan account is closed once its balance is zero, and an active autopay is marked completed; unapplied money stays to be refunded. A payment that brings the loan current takes it off nonaccrual.
A payment from a customer's deposit account is screened like any other outgoing payment. If monitoring holds it, the transaction comes back with an empty allocation, and the split is worked out when it is cleared. The same idempotencyKey with the same details replays the original payment; with different details it is refused (409). One loan is serviced at a time: a second request while one runs answers This loan is being serviced. Check its status and retry the same request. (409).
payments/:txn/reverse { reason } (required) undoes a posted loan payment, for an ACH return or a mistake. The ledger lines are swapped, the split comes back off the loan's balances and installments, a paid-off loan's account reopens, and late fees are looked at again. A payoff whose pledge was already released is refused until the pledge is restored. The generic POST /banking/transactions/:id/reverse hands a loan payment to this same reversal, but only for someone who can open Loans; other lending entries (interest, fees, disbursement, charge-off, recovery) are refused there.
unapplied { action: apply | refund, to?, amount? } (amount defaults to all of it): apply runs it through the payment split from the suspense book; refund pays it to a deposit account (default the linked one).
Charge-off and recovery
/banking/loans/:id/charge-offSTAFF/banking/loans/:id/recoverySTAFFcharge-off { reason } asks for charge_off on an active or arrears loan, for the loan account's posted balance. When it runs: posted interest the borrower hasn't paid is reversed out of interest income first, then what is left is charged off (Dr charge-offs, Cr the loan). The loan goes charged_off and nonaccrual with its balances at zero (unapplied money kept), a pledge is released, autopay is ended, and the result carries form1099cMayApply when $600 or more was charged off.
recovery { amount, from, note? } posts money received on a charged-off loan only: Dr from (a deposit account or a book), Cr charge-offs. The total is kept in recovered.
End of day
The Loans end of day job (banking-loans-end-of-day, daily at 23:30 in the bank's time zone, for orgs that have loans) runs once per loan per day:
- Before each loan, signed autopay runs: on a due date it pays the installments due that day (never more than the payoff or the signed maximum) from the borrower's account. A missed installment, fees owed, an earlier attempt not posted, or a payment held by monitoring pauses the instruction instead of retrying.
- Interest accrues daily on the principal at the loan's rate (the SCRA cap where it applies) by its day count, and is posted to the ledger in whole cents (Dr the loan, Cr interest income) at month end and on due dates, as well as before any payment or modification.
- Delinquency: installments are relabelled, and days past due, bucket and
active/arrearsstatus move. - Nonaccrual at
lending.nonaccrualDays(90) days past due: the loan stops accruing and its uncollected posted interest is reversed. - Late fees, once per installment still short after its grace days, by the product's late rule (flat or a share of the installment, held to its cap); none while a bankruptcy flag is on.
- Charge-off candidates: a loan at
lending.chargeOffDaysClosedEnd(120) days past due,chargeOffDaysOpenEnd(180) for a line of credit, or 60 days after a bankruptcy notice is flaggedchargeOffCandidate. Nothing is charged off automatically. - Promises to pay and arrangements are settled (see below).
The result is { processed, skipped, failed, errors }. On loans made under the current accrual convention, a change of principal or rate is refused once the day's interest is closed: This loan's interest day is already closed or the value date is unsupported…
Collections
/banking/collections/summarySTAFF/banking/collections/queueSTAFF/banking/collections/loans/:idSTAFF/banking/collections/loans/:id/activitiesSTAFF/banking/collections/loans/:id/activitiesSTAFF/banking/collections/loans/:id/flagsSTAFF/banking/collections/loans/:id/charge-offSTAFFsummary → { today, buckets, pastDue30, promisesToday, broken, nearChargeOff, chargeOffCandidates, nearChargeOffDays }. broken counts broken promises and arrangements logged in the last 30 days; nearChargeOff counts loans within 30 days of the closed-end charge-off days.
queue, paged: ?view=bucket (default: every past-due loan, worst first; ?bucket narrows it), promises_today, broken, near_charge_off; ?flag, ?q, ?sort=dpd|balance|nextDue → { total, data: [{ sk, number, borrower, phone, dpd, bucket, balance, pastDue, nextDue, accrualStatus, flags, chargeOffCandidate, lastContact, promise }] }.
loans/:id is the collector's drawer → { loan, borrower, limits, log, open, chargeOff: { recommended, reasons, daysToChargeOff, amount } }. limits says where the debt stands right now: timezone and timezoneSource (the customer's own zone, else their state's main zone, else the bank's), localTime, windowStart, windowEnd, insideWindow, callsLast7Days, callsPer7Days, callsLeft, nextAttemptAt, lastConversation, cooldownUntil, stop and canCall. Charge-off reasons: past the closed-end days (FFIEC retail classification), a bankruptcy notice 60 days old, a deceased borrower, or fraud.
activities ?kind lists the contact log, newest first.
POST activities logs a contact, promise or arrangement: { kind, direction?, outcome?, note?, promise?, arrangement?, nextActionAt? }.
kind:call,letter,sms,email,visit,promise,arrangement,note.directionisoutbound(default) orinbound.promise: { amount, dueDate }(today or later) is savedpending.arrangement: { installments: [{ dueDate, amount }] }is savedactive.- An outbound
smsoremailneeds the message innote. - An
outcomeofbankruptcy_reported,deceased_reportedorcease_requestedsets the matching flag on the loan.
The bank collects its own debt, so Reg F doesn't bind it, but its limits are applied as policy (Banking Config collections). A refused contact is not logged, and answers 409:
| Limit | Default | Refusal |
|---|---|---|
Outbound calls only between windowStart and windowEnd, borrower's time | 08:00–21:00 | It is … where the borrower is (…). Calls go between … and … their time — try again then. |
At most callsPer7Days outbound call attempts per debt in 7 days | 7 | Names the count and when the next attempt is allowed |
No call within conversationCooldownDays of a conversation about the debt (a right-party call) | 7 | The bank spoke with the borrower about this debt on … (Reg F 7-day rule). |
| Bankruptcy flag | — | Nothing but a note or an inbound contact |
| Deceased, attorney-represented or cease-contact flag | — | No outbound contact; after a cease request, a letter may still go |
A posted loan payment settles promises and arrangements: a promise is kept when payments since it was made, up to its date, reach the amount, and broken once its date passes short. An arrangement is broken when any of its dates passes short, and completed when the total is paid. A reversed payment reopens the promises it kept.
charge-off { reason? } recommends the charge-off through the same charge_off maker-checker; without a reason, the drawer's reasons are used.
Datatypes: banking_loan_product, banking_loan_application, banking_loan, banking_collection_activity. Loan money moves as banking_transaction kinds loan_disbursement, loan_payment, loan_interest, loan_fee, charge_off, recovery and adjustment (SCRA), against the books interest_income, fee_income_loans, loan_suspense and charge_offs.