Lending Workflow Architecture: From Application to Repayment
A lending platform moves loans through defined states from application to repayment (or default). This note covers the lifecycle state machine, decision engine integration, disbursement, repayment, and delinquency.
Loan lifecycle state machine
Model states explicitly: application, under_review, approved, rejected, disbursed, active, repaid, closed, defaulted. Transitions are events; emit them for downstream systems. Validate transitions (e.g. cannot disburse from rejected). Store state and history for audit.
Credit decision engine integration
Integrate with internal or third-party decision engines via API or async. Pass application data; receive approve/decline and terms. Store decision payload and version. Emit an event (e.g. application.decided) so disbursement and other services can react. Never overwrite a final decision.
Disbursement logic
Disbursement is a payment from the lender to the borrower. Use your payment orchestration layer; link the payment to the loan. On success, transition loan to active and emit disbursed event. Handle failures and retries idempotently.
Repayment tracking
Track repayments against the loan (amount, date, source). Apply to principal/interest per your policy. Update remaining balance and state. Emit repayment events for accounting and collections.
Delinquency handling
Define delinquency buckets (e.g. 1–30, 31–60 days). Update on schedule or on repayment events. Trigger workflows (reminders, collections, default). Keep delinquency state and history for reporting and compliance.
Book Architecture Strategy Call
Schedule a call →