Endpoint
Authentication
Requires authentication withBearer token. All staff roles (Admin, Supervisor, Credit Officer) can access this endpoint.
Query Parameters
Page number for pagination
Number of records per page (max 100)
Filter repayments for a specific loan by loan ID
Filter repayments received by a specific user/officer
Filter by payment method. Options:
CASH- Cash paymentTRANSFER- Bank transferPOS- Point of sale terminalMOBILE- Mobile money (e.g., M-Pesa)USSD- USSD paymentOTHER- Other payment methods
Filter repayments from this date (ISO 8601 format: YYYY-MM-DD)
Filter repayments up to this date (ISO 8601 format: YYYY-MM-DD)
Role-Based Access
- Admin: Can view all repayments across the system
- Supervisor: Can view all repayments across all unions
- Credit Officer: Can only view repayments for loans in their assigned unions
Response
Indicates if the request was successful
Response message (e.g., “Repayments retrieved successfully”)
Array of repayment objects
Unique identifier for the repayment record
ID of the loan this repayment is for
Payment amount received
Currency code for the payment
Date and time when payment was made (ISO 8601)
Payment method used (CASH, TRANSFER, POS, MOBILE, USSD, OTHER)
Optional payment reference number or transaction ID
Optional notes about the payment
ID of the user who recorded this repayment
Array showing how this payment was allocated to repayment schedule items
Allocation ID
Amount allocated to this schedule item
Timestamp when repayment record was created
Timestamp when repayment record was last updated
Example Request
Example Response
Payment Allocation
When a repayment is recorded, the system automatically allocates the payment to pending repayment schedule items:- Sequential Allocation: Payments are allocated to schedule items in order of their due dates (oldest first)
- Partial Payments: If the payment amount is less than what’s due, it’s recorded as a partial payment and the schedule item status becomes
PARTIAL - Excess Payments: If the payment exceeds what’s due for the current item, the remaining amount is applied to the next pending items
- Allocations Array: The
allocationsfield shows exactly how each payment was distributed across schedule items
Error Responses
Bad request - invalid query parameters
Unauthorized - missing or invalid authentication token
Forbidden - insufficient permissions
