For the complete documentation index, see llms.txt. This page is also available as Markdown.

Repay Loan

To repay a loan, send a POST request to the endpoint:

POST /api/loanaccount/v1/repayloan

The request body requires the loanAccountNumber, instrumentNumber, and amount, along with the relevant GL accounts; collectionsGL is always required, and feeIncomeGL becomes required if there's a fee on the GL.

A successful request will return a status and message confirming the repayment, along with a data object containing the transaction's statusCode, referenceNumber, instrumentNumber, and duration.

This process allows customers to make repayments towards an existing loan, and supports optional early termination of the loan as part of the same request.

Headers

Name
Value

Content-Type*

application/json

Authorization*

Bearer

Request-Reference*

{unique_reference}

Body

Name
Data Type (Length)
Required
Description

loanAccountNumber

string (50)

The loan account number.

instrumentNumber

string (50)

A unique instrument number for this repayment.

amount

number

The amount to be paid into the linked account for loan deductions. Amount should be sent in the base unit of the currency. For example, 500 naira should be sent as 50,000 kobo.

collectionsGL

string (10)

A General Ledger Account created on the CBA portal. This GL will typically be a Bank GL. For Production, the GL should be requested from the Bank.

feeIncomeGL

string (10)

A General Ledger Account created on the CBA portal. This GL will typically be an Income GL. For Production, the GL should be requested from the Bank. This property only becomes required if there is a fee on the GL.

earlyTermination

boolean

Set to true if the loan should be terminated as part of this repayment. False by default. For this to succeed, the Amount must be able to pay off all outstanding debts, upcoming principal, and fees.

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

Sample Request
curl --location -g '{{baseurl}}/api/loanaccount/v1/repayloan' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data '{
  "loanAccountNumber": "1000003305000074660",
  "instrumentNumber": "",
  "amount": 80000,
  "collectionsGL": "10204005",
  "feeIncomeGL": "40101022",
  "earlyTermination": false
}'
Response: 200

Last updated