Lending and loan origination
A loan origination system (LOS) takes a borrower from “I’d like a loan” to money in their account. A servicing system then manages the loan until it’s paid off. In between sit identity checks, credit data, a decision, legally required disclosures and a funding payment, and every one of those steps must be explainable later to an auditor, a regulator or the borrower.
The architectural challenge is that lending is both fast and heavily audited. Borrowers expect a decision in minutes. Regulators expect you to show, years later, exactly why each decision was made.
Diagram
Section titled “Diagram”- The borrower applies; the application is a state machine, not a form in a database row.
- Identity and fraud checks run, then the decision engine pulls credit and bank data and applies the current rules.
- An approved offer produces the required disclosures and a contract for e-signature.
- The signed loan moves to servicing, which funds it and collects repayments through the payments platform.
How it works
Section titled “How it works”- The application is a state machine. Started, identity verified, decisioned, offered, signed, funded, declined, withdrawn. Each transition is an event with a timestamp and actor, which makes reporting and audit straightforward.
- The decision engine is its own service. Rules and scorecards are versioned like code. Every decision records the inputs it saw, the rule version that ran, the outcome and the reasons. This is the single most important design choice in the platform.
- External data behind adapters. Credit bureaus, bank-data aggregators, income and identity providers each sit behind an adapter. Responses are stored as received, because you’ll need to show what the bureau actually returned.
- Disclosures are generated, not typed. Pricing, terms and required notices come from the same data the decision used, so the borrower sees exactly what was approved.
- Servicing is a separate domain. Origination ends at funding. Servicing owns the payment schedule, balances, fees, hardship plans and payoff. It usually needs a ledger, like a payments platform.
- Funding and repayment over payment rails, typically ACH, with returns handled as first-class events.
The rules that shape the design
Section titled “The rules that shape the design”Lending is regulated, and the rules turn directly into system requirements. A few examples from U.S. law:
| Requirement | What it means for the architecture |
|---|---|
| Adverse action notices (ECOA / Regulation B). Applicants who are declined must be told the specific principal reasons. (12 CFR 1002.9 (opens in a new tab)) | The decision engine must produce human-readable reasons, not just a score |
| Reasons must be accurate even for complex models. The CFPB has said creditors can’t avoid this because a model is hard to explain. (CFPB Circular 2022-03 (opens in a new tab)) | Choose models you can explain, and log the explanation with the decision |
| Record retention. Regulation B requires creditors to keep application records for 25 months after notifying the applicant, in most cases. (12 CFR 1002.12 (opens in a new tab)) | Immutable decision records with a retention policy at least that long. Many lenders keep them longer |
| Use of credit reports (FCRA) | Store which report was pulled and why; include required credit score disclosures in notices |
This isn’t legal advice, and other federal and state rules apply. Treat compliance as a set of requirements your compliance team owns and your architecture must make easy to meet.
- Fast, consistent decisions that are the same for every applicant with the same data.
- Explainability by design: every outcome can be traced to its inputs and rule version.
- Change without fear: new products or rule changes ship as new versions, with the old ones kept for audit.
- Many external dependencies, each with outages, costs per call and contract terms.
- Compliance work is continuous, and rules vary by product and state.
- Data retention and privacy add storage and access-control obligations.
When to use it
Section titled “When to use it”- Any organization originating consumer or business credit at volume.
- When decisions must be fast and explainable, and products change often.
When to avoid it
Section titled “When to avoid it”For low volumes or a single simple product, a commercial LOS may be cheaper and faster than building. Build when lending is the product and your differentiation lies in decisions, speed or experience.
Common pitfalls
Section titled “Common pitfalls”- Overwriting the application as it changes, losing what the decision actually saw.
- Rules buried in application code, so nobody can say which version applied to a past loan.
- A model nobody can explain, discovered when the first adverse action notice is due.
- Origination and servicing in one database, so a change to one breaks the other.
Related patterns
Section titled “Related patterns”- See it applied: Example Lending, a complete architecture repository for a fictional lender
- Payments architecture
- Event-driven architecture
- CQRS and event sourcing
- TOGAF worked example: Example Lending
- Scenario: audit readiness
Glossary: idempotency, saga
Further reading
Section titled “Further reading”Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.