Overview
The Loan Management system handles the complete lifecycle of microfinance loans, from initial application through approval, disbursement, repayment tracking, and final closure.Loans are always associated with both a union member (borrower) and a union. The loan inherits the credit officer from the union.
Loan Data Model
From the Prisma schema:Loan Status Lifecycle
Loans move through several statuses:Status Flow Diagram
Alternative Outcomes
DEFAULTED
Borrower stopped paying and is significantly overdue
WRITTEN_OFF
Bad debt that will not be recovered
CANCELED
Application withdrawn before disbursement
Creating a New Loan Application
Prerequisites
Creation Process
Select Borrower
- Choose Union from dropdown
- Select Union Member (only verified members appear)
- System auto-fills member details
Loan Details
Required Fields:
- Loan Type - Select from configured types
- Principal Amount - How much to lend (in Naira)
- Interest Rate - Annual percentage (may auto-fill from loan type)
- Loan Term - Duration count
- Term Unit - Days, Weeks, or Months
- Repayment Frequency - How often payments are due
- Purpose - Why the loan is needed
- Start Date - When the loan begins
Review Schedule
The system automatically generates:
- Complete repayment schedule
- Payment due dates
- Principal and interest breakdown
- Total amount to be repaid
Term Units Explained
Example: 6-Month Loan
Example: 6-Month Loan
- Term Count: 6
- Term Unit: MONTH
- Result: 6 monthly payments over 6 months
API Endpoint
Viewing All Loans
The Loans page provides comprehensive filtering and viewing:Summary Cards
- Total loans count
- Active loans
- Pending approvals
- Overdue loans
- Total disbursed amount
Search & Filter
- Search by loan number or borrower
- Filter by status
- Filter by union
- Filter by date range
- Filter by amount range
- Filter by credit officer
Data Table
- Loan number
- Borrower name
- Principal amount
- Status badge
- Due date
- Payment progress
- Actions (view, edit, delete)
Export Options
- Export to Excel
- Export to PDF
- Copy to clipboard
- Filter before export
Configurable Columns
Available columns:- Loan Number
- Union Member
- Loan Type
- Principal Amount
- Due Today
- Status
- Credit Officer
- Union
- Overdue Amount
- Payment Status
- Actions
Loan Approval Workflow
Only Supervisors and Administrators can approve or reject loan applications
For Supervisors: Reviewing Pending Loans
Review Application
Click on a loan to view:
- Borrower information and history
- Loan amount and terms
- Repayment schedule
- Purpose of loan
- Credit officer notes
API Endpoints
Disbursing Loans
Once approved, loans can be disbursed:Enter Details
Provide disbursement information:
- Disbursement Date (defaults to today)
- Payment Method (Cash, Bank Transfer, Mobile Money, etc.)
- Reference Number (transaction ID, check number, etc.)
- Notes (optional)
API Endpoint
Viewing Loan Details
Click any loan to see comprehensive information:- Overview
- Repayment Schedule
- Payment History
- Documents
- Status History
- Loan number and status
- Borrower details with profile
- Principal, interest, and total amounts
- Start and end dates
- Loan type and terms
- Processing and penalty fees
- Created by and assigned officer
Repayment Schedule
The system automatically generates a repayment schedule based on:- Principal amount
- Interest rate
- Loan term and frequency
- Start date
Schedule Model
Schedule Calculation Example
Example: ₦50,000 loan for 5 months at 10% annual interest
Example: ₦50,000 loan for 5 months at 10% annual interest
Loan Details:
- Principal: ₦50,000
- Term: 5 months
- Annual Interest: 10%
- Monthly Interest: 10% / 12 = 0.833%
- Total with interest: ₦50,000 + (₦50,000 × 0.10 × 5/12) = ₦52,083
- Monthly payment: ₦52,083 / 5 = ₦10,417
| Seq | Due Date | Principal | Interest | Total |
|---|---|---|---|---|
| 1 | Feb 1 | ₦10,000 | ₦417 | ₦10,417 |
| 2 | Mar 1 | ₦10,000 | ₦417 | ₦10,417 |
| 3 | Apr 1 | ₦10,000 | ₦417 | ₦10,417 |
| 4 | May 1 | ₦10,000 | ₦417 | ₦10,417 |
| 5 | Jun 1 | ₦10,000 | ₦417 | ₦10,417 |
Regenerating Schedules
Loan Assignment
Loans can be reassigned to different credit officers:Reassignment changes the
assignedOfficerId but doesn’t change the union or borrower.Editing Loans
Editable fields:- Loan amount (if not yet approved)
- Terms and duration
- Interest rate
- Processing fees
- Notes
- Borrower
- Union
- Disbursement date
- Repayment history
Deleting Loans
Loans are soft deleted (marked with
deletedAt) to maintain audit trail and reporting accuracy.Loan Summary and Analytics
Each loan provides summary metrics:Financial Summary
- Principal amount
- Total interest
- Processing fees
- Penalty fees
- Total amount due
- Total paid to date
- Outstanding balance
Payment Performance
- Payments on time
- Late payments
- Missed payments
- Completion percentage
- Days overdue (if any)
Schedule Progress
- Total installments
- Paid installments
- Pending installments
- Overdue installments
- Next payment due date
Timeline
- Application date
- Approval date
- Disbursement date
- First payment date
- Expected completion date
- Actual completion date
API Endpoint
Best Practices
Application Process
- Verify member identity before creating loan
- Use consistent loan types
- Document loan purpose clearly
- Review schedule before submission
Approval
- Review borrower’s history
- Check existing loan performance
- Verify ability to repay
- Document approval decision
Disbursement
- Confirm borrower receipt
- Record accurate payment method
- Keep transaction references
- Disburse only approved loans
Monitoring
- Track payment schedules daily
- Follow up on overdue payments early
- Update loan notes regularly
- Communicate with borrowers
Troubleshooting
Cannot create loan
Cannot create loan
Check:
- Member is verified
- Member belongs to a union
- All required fields are filled
- Amount is within allowed range
- You have permission to create loans
Cannot submit for approval
Cannot submit for approval
Verify:
- Loan is in DRAFT status
- All required information is complete
- Schedule was generated successfully
- No validation errors
Cannot disburse loan
Cannot disburse loan
Reasons:
- Loan is not in APPROVED status
- You lack disbursement permissions
- Member is no longer verified
- Technical error - contact support
Schedule not generating
Schedule not generating
Possible causes:
- Invalid term count (must be > 0)
- Invalid date range
- Missing interest rate
- System calculation error
Cannot edit loan
Cannot edit loan
Reason: Loan status doesn’t allow editingStatus Rules:
- DRAFT - Fully editable
- PENDING_APPROVAL - Limited editing
- APPROVED/ACTIVE - Cannot edit
- COMPLETED - View only
API Reference
Summary
Loan Management provides:- ✅ Complete application workflow
- ✅ Supervisor approval process
- ✅ Automated schedule generation
- ✅ Disbursement tracking
- ✅ 8 distinct status types
- ✅ Role-based permissions
- ✅ Comprehensive reporting
- ✅ Document management
- ✅ Assignment history
Next Steps
- Record Repayments for active loans
- Monitor Repayment Schedules for due dates
- Generate Reports for portfolio analysis
