FinServ API Documentation - Balance Check

Balance Check API

The Balance Check API allows authorized clients to retrieve the current balance of a customer’s account.

Endpoint

POST /api/balance

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)

{
  "accountNumber": "1234567890"
}

Response

Success (200 OK)

{
  "accountNumber": "1234567890",
  "balance": 250000.75,
  "currency": "NGN"
}

Error Responses

Example Usage

JavaScript (Browser Console)

fetch("https://banking.finserv.com.ng/api/balance", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": "YOUR_SECURE_API_KEY"
  },
  body: JSON.stringify({ accountNumber: "1234567890" })
})
.then(response => response.json())
.then(data => {
  console.log("Account:", data.accountNumber);
  console.log("Balance:", data.balance, data.currency);
})
.catch(error => console.error("Error:", error));

Postman

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

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