FinServ API Documentation - Account Opening

Account Opening API

The Account Opening API allows authorized clients to open new accounts for registered customers.

Endpoint

POST /api/account

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)

{
  "customerId": "CUST123456",
  "accountType": "Savings",
  "initialDeposit": 20000
}

Response

Success (200 OK)

{
  "accountNo": "ACCT654321",
  "customerId": "CUST123456",
  "accountType": "Savings",
  "initialDeposit": 20000,
  "status": "opened"
}

Error Responses

Example Usage

JavaScript (Client Side)

fetch("https://banking.finserv.com.ng/api/account", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "x-api-key": "YOUR_SECURE_API_KEY"
  },
  body: JSON.stringify({
    customerId: "CUST123456",
    accountType: "Savings",
    initialDeposit: 20000
  })
})
.then(response => response.json())
.then(data => {
  console.log("Account Number:", data.accountNo);
  console.log("Customer ID:", data.customerId);
  console.log("Account Type:", data.accountType);
  console.log("Initial Deposit:", data.initialDeposit);
  console.log("Status:", data.status);
})
.catch(error => console.error("Error:", error));

Postman

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

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