The Loan Repayment API allows authorized clients to record repayments against loan schedules.
POST /api/loans/repay
Base URL: https://banking.finserv.com.ng
This endpoint requires an API key.
| Header | Value |
|---|---|
| x-api-key | Your assigned API key |
| Key | Value |
|---|---|
| Content-Type | application/json |
| x-api-key | YOUR_SECURE_API_KEY |
{
"loanId": "LOAN123456",
"scheduleId": "SCH001",
"scheduleDate": "2026-02-01",
"amount": 50000
}
{
"repaymentId": "REPAY654321",
"loanId": "LOAN123456",
"scheduleId": "SCH001",
"scheduleDate": "2026-02-01",
"amountPaid": 50000,
"status": "completed"
}
{"error": "Loan ID, Schedule ID, Schedule Date, and valid Amount are required"}{"error": "Loan or Repayment schedule not found"}{"error": "API Key is missing"}{"error": "Invalid API Key"}fetch("https://banking.finserv.com.ng/api/loans/repay", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_SECURE_API_KEY"
},
body: JSON.stringify({
loanId: "LOAN123456",
scheduleId: "SCH001",
scheduleDate: "2026-02-01",
amount: 50000
})
})
.then(response => response.json())
.then(data => {
console.log("Repayment ID:", data.repaymentId);
console.log("Loan ID:", data.loanId);
console.log("Schedule ID:", data.scheduleId);
console.log("Schedule Date:", data.scheduleDate);
console.log("Amount Paid:", data.amountPaid);
console.log("Status:", data.status);
})
.catch(error => console.error("Error:", error));
Set method to POST, URL to https://banking.finserv.com.ng/api/loans/repay, add headers, and body as shown above.