The Account Opening API allows authorized clients to open new accounts for registered customers.
POST /api/account
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 |
{
"customerId": "CUST123456",
"accountType": "Savings",
"initialDeposit": 20000
}
{
"accountNo": "ACCT654321",
"customerId": "CUST123456",
"accountType": "Savings",
"initialDeposit": 20000,
"status": "opened"
}
{"error": "Customer ID, Account Type, and valid Initial Deposit are required"}{"error": "Customer not found"}{"error": "API Key is missing"}{"error": "Invalid API Key"}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));
Set method to POST, URL to https://banking.finserv.com.ng/api/account, add headers, and body as shown above.