FinServ API Documentation - Loan Status

Loan Status API

The Loan Status API allows authorized clients to check the current status of a loan.

Endpoint

POST /api/loans/status

Base URL: https://banking.finserv.com.ng

Authentication

This endpoint requires an API key.

HeaderValue
x-api-keyYour assigned API key

Request

Headers

KeyValue
Content-Typeapplication/json
x-api-keyYOUR_SECURE_API_KEY

Body (JSON)

{
  "loanId": "LOAN123456"
}

Response

Success (200 OK)

{
  "principal": 500000,
  "totalRepayment": 600000,
  "balance": 200000,
  "status": "active"
}

Error Responses

Example Usage

JavaScript (Client Side)

fetch("https://banking.finserv.com.ng/api/loans/status", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": "YOUR_SECURE_API_KEY"
  },
  body: JSON.stringify({
    loanId: "LOAN123456"
  })
})
.then(response => response.json())
.then(data => {
  console.log("Principal:", data.principal);
  console.log("Total Repayment:", data.totalRepayment);
  console.log("Balance:", data.balance);
  console.log("Status:", data.status);
})
.catch(error => console.error("Error:", error));

Postman

Set method to POST, URL to https://banking.finserv.com.ng/api/loans/status, add headers, and body as shown above.

Note: Always use HTTPS to protect sensitive data. Rotate API keys regularly for security.