Overview
The Repayments system handles all aspects of loan payment processing, from recording individual payments to tracking schedule compliance and managing partial payments. Every payment is automatically allocated against the borrower’s repayment schedule.Repayments are automatically allocated to schedule items, paying interest first, then principal, following industry best practices.
Repayment Data Model
From the Prisma schema:Payment Allocation Model
Each repayment can be split across multiple schedule items. The system tracks exactly how much of each payment went to which installment.
Recording a New Repayment
Method 1: From Repayments Page
Enter Details
Required Fields:
- Amount - Payment amount in Naira
- Payment Date - When payment was made
- Payment Method - How payment was received
- Reference Number - Transaction ID, check number, etc.
- Notes - Any additional information
Method 2: From Loan Detail Page
Method 3: From Repayment Schedules
Payment Methods
CASH
Physical cash payment collected in person
TRANSFER
Bank transfer or electronic funds transfer
POS
Card payment via Point of Sale terminal
MOBILE
Mobile money transfer (M-Pesa, etc.)
USSD
Payment via USSD banking code
OTHER
Any other payment method
Best Practices by Method
CASH Payments
CASH Payments
- Count cash carefully before recording
- Issue receipt immediately
- Store securely until banking
- Record exact denominations in notes if large amount
TRANSFER Payments
TRANSFER Payments
- Always get transaction reference number
- Verify transfer in bank account
- Match amount exactly
- Record sender name in notes
POS/Card Payments
POS/Card Payments
- Ensure transaction approved before recording
- Save POS receipt
- Record approval code as reference
- Give customer their receipt copy
MOBILE Money
MOBILE Money
- Get confirmation SMS/code
- Verify money received in mobile wallet
- Record transaction ID
- Note mobile number used
Payment Allocation Logic
The system automatically allocates payments using this priority:Example Allocation
Payment Allocation Example
Payment Allocation Example
Scenario:
- Schedule Item 1: ₦10,000 due (Jan 1) - ₦5,000 paid, ₦5,000 outstanding
- Schedule Item 2: ₦10,000 due (Feb 1) - ₦0 paid, ₦10,000 outstanding
- Payment received: ₦12,000
- ₦5,000 → Schedule Item 1 (completes it, status: PAID)
- ₦7,000 → Schedule Item 2 (partial, status: PARTIAL)
- Remaining on Item 2: ₦3,000
- Item 1: Closed (closedAt set)
- Item 2: Partially paid
- Loan outstanding reduced by ₦12,000
API Endpoint
Viewing Repayment History
All Repayments View
Available Filters
Date Range
Filter payments by payment date range
Loan
View payments for a specific loan
Payment Method
Filter by CASH, TRANSFER, POS, etc.
Received By
See payments recorded by specific staff member
Repayment List Columns
- Date - When payment was made
- Loan Number - Associated loan
- Borrower - Member who paid
- Amount - Payment amount in Naira
- Method - How payment was received
- Reference - Transaction reference
- Received By - Staff who recorded it
- Actions - View details, edit, delete
For a Specific Loan
Repayment Schedules Management
The Repayment Schedules page provides powerful tracking:This is your daily operations hub for managing collections across all loans
Access Schedules
Summary Cards
Total Schedules
Total number of payment schedules matching filters
Pending Payments
Count of unpaid, non-overdue installments
Overdue
Number of payments past their due date
Total Amount Due
Sum of all pending and overdue amounts (in Naira)
Summary cards update automatically based on your active filters
Advanced Filtering
Search by Borrower
Search by Borrower
Type borrower name to filter schedules
Filter by Union
Filter by Union
Select a union from searchable dropdown to view its schedules
Filter by Union Member
Filter by Union Member
Select specific member to see their payment schedule
Filter by Credit Officer
Filter by Credit Officer
View schedules for loans managed by specific officer
Filter by Status
Filter by Status
- PENDING - Not yet paid, not overdue
- PAID - Fully paid
- PARTIAL - Partially paid
- OVERDUE - Past due date and unpaid
Date Range Filter
Date Range Filter
Three modes:
- Today Only - Payments due today
- Single Date - Pick one specific date
- Date Range - Select start and end dates
Amount Range
Amount Range
Filter by minimum and maximum due amount
Schedule List Features
Sorting
Click column headers to sort by:
- Due date
- Borrower name
- Amount due
- Status
- Union
Pagination
- Adjustable rows per page (10, 20, 50, 100)
- Next/Previous navigation
- Jump to specific page
Quick Actions
- Pay Due - Record exact scheduled amount
- Custom - Record partial or different amount
- View Loan - Open full loan details
Visual Indicators
Color-coded status badges:
- 🟡 Yellow - Pending
- 🟢 Green - Paid
- 🔵 Blue - Partial
- 🔴 Red - Overdue
Handling Different Payment Scenarios
Exact Payment (On Schedule)
Member pays exact installment amount on time
Member pays exact installment amount on time
Action:
- Record payment with exact schedule amount
- System marks schedule item as PAID
- Sets
closedAttimestamp - Moves to next installment
Partial Payment
Member pays less than scheduled amount
Member pays less than scheduled amount
What Happens:
- Record actual amount paid
- System marks schedule item as PARTIAL
- Tracks
paidAmountvstotalDue - Shortfall carries to next collection
- Interest continues to apply
- Due: ₦10,000
- Paid: ₦7,000
- Remaining: ₦3,000
- Status: PARTIAL
- Follow up with borrower
- Document reason in notes
- Track cumulative shortfall
Overpayment
Member pays more than current installment
Member pays more than current installment
Allocation Logic:
- Full amount applied to current schedule item (closes it)
- Excess applied to next overdue item (if any)
- Remaining excess applied to next future installment
- Loan completes early if total paid
- Due this month: ₦10,000
- Paid: ₦15,000
- Allocation:
- ₦10,000 → Current item (PAID)
- ₦5,000 → Next item (PARTIAL or PAID)
Late Payment
Payment received after due date
Payment received after due date
Status Flow:
- Schedule item marked OVERDUE when due date passes
- Penalty fees may apply (based on loan settings)
- When paid, item changes to PAID
- Late payment is noted in history
- Calculate any penalty fees
- Add penalty to payment if applicable
- Document late reason
- Follow up on future payments
Multiple Payments in One Day
Borrower makes several payments same day
Borrower makes several payments same day
Handling:
- Record each payment separately
- System allocates them in order recorded
- Each creates separate allocation records
- All show same
paidAtdate
Editing Repayments
Modify Fields
Can change:
- Payment date
- Amount (recalculates allocations)
- Payment method
- Reference number
- Notes
- Associated loan
- Received by user
Editing a payment amount triggers re-allocation across schedule items
Deleting Repayments
Repayments are soft deleted (marked with
deletedAt) for audit purposesRepayment Summary and Reports
Summary Endpoint
Collections by Union
Track collection performance by union:Collections Report Shows
Collections Report Shows
- Union name
- Number of active loans
- Total collected
- Collection rate percentage
- Overdue amount
- Credit officer name
Best Practices
Recording Payments
- Record payments on the day received
- Double-check amounts before saving
- Always get transaction references
- Issue receipts to borrowers
- Add notes for unusual circumstances
Payment Methods
- Use correct payment method
- For TRANSFER, wait for bank confirmation
- For CASH, count in front of borrower
- Keep POS receipts for 90 days
- Verify MOBILE money before recording
Schedule Monitoring
- Check schedules daily
- Follow up on overdue items promptly
- Use “Today Only” filter each morning
- Contact borrowers before due dates
- Track patterns in late payments
Data Accuracy
- Verify loan before recording
- Confirm amount with borrower
- Save reference numbers
- Don’t delete repayments unnecessarily
- Keep audit trail clear
Daily Workflow
Morning Check
- Filter schedules by “Today Only”
- Review all payments due today
- Note borrowers to contact
Troubleshooting
Cannot record repayment
Cannot record repayment
Check:
- Loan exists and is ACTIVE
- Amount is positive and reasonable
- Payment date is valid
- You have necessary permissions
- Loan isn’t already completed
Payment allocated incorrectly
Payment allocated incorrectly
Reason: System follows interest-first allocationSolution:
- This is intentional behavior
- Contact administrator if business rules need adjustment
- Document in notes if different allocation expected
Cannot edit payment
Cannot edit payment
Possible reasons:
- You lack permission (Credit Officer role)
- Loan is completed or closed
- Payment is part of completed loan
Schedule item still showing overdue after payment
Schedule item still showing overdue after payment
Check:
- Payment was properly allocated
- Amount paid was sufficient
- Status updated (may need page refresh)
- System processed allocation
Missing repayments in history
Missing repayments in history
Verify:
- Date range filter includes the dates
- Loan filter is correct
- Repayments weren’t deleted
- You have permission to view them
API Reference
Summary
Repayment Management provides:- ✅ Multiple payment recording methods
- ✅ 6 payment method types (CASH, TRANSFER, POS, MOBILE, USSD, OTHER)
- ✅ Automatic payment allocation
- ✅ Schedule tracking with 4 statuses (PENDING, PARTIAL, PAID, OVERDUE)
- ✅ Partial and overpayment handling
- ✅ Advanced filtering and search
- ✅ Real-time summary cards
- ✅ Collections reporting by union
- ✅ Transaction reference tracking
- ✅ Audit trail preservation
