Charge Repayment
Loans
Charge Repayment
Initiate a repayment charge against an active loan.
POST
Charge Repayment
Overview
Initiates a repayment charge for an active loan. All amounts are in kobo.Note: The:loanIdpath parameter is the loan ID (fieldloan_idon the application record, populated after disbursement) — not theapplication_id.
Request
Method:POSTURL:
/v1/loans/:loanId/repayments
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-carbon-key | Header | string | Yes | API key for authentication. |
loanId | Path | string | Yes | Loan ID from the application record (loan_id field). |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Repayment amount in kobo. Must be positive. |
reference | string | Yes | Merchant-supplied reference for this repayment. |
Response
200 OK
Error Responses
| Status | Message | Cause |
|---|---|---|
| 400 | Loan not found | loanId does not match any loan under this merchant |
| 400 | amount must be a positive number (in kobo) | amount is zero, negative, or not a number |
| 400 | reference is required | Missing repayment reference |
| 422 | No SME loan ID on record | Loan not yet registered in lending engine |
Authorizations
Provide your API key in the 'apikey' header.
Headers
Path Parameters
Loan ID from the application record (loan_id field, not application_id)
Body
application/json
Provide the required values for the request body.
Response
200 - application/json
Successful response
The response is of type object.