https://{your-domain}.fincode.software/api/v1/services/user/create-bank-account
{
"status": "<string>",
"data": {
"accountId": "<string>",
"customerId": "<string>",
"accountNumber": "<string>",
"accountName": "<string>",
"bankCode": "<string>",
"bankName": "<string>",
"isDefault": true,
"isVerified": true
}
}API Endpoints
Add Bank Account
Allows customers to add a bank account to their profile for loan disbursements and repayments.
POST
/
api
/
v1
/
services
/
user
/
create-bank-account
https://{your-domain}.fincode.software/api/v1/services/user/create-bank-account
{
"status": "<string>",
"data": {
"accountId": "<string>",
"customerId": "<string>",
"accountNumber": "<string>",
"accountName": "<string>",
"bankCode": "<string>",
"bankName": "<string>",
"isDefault": true,
"isVerified": true
}
}Customers can use this endpoint to register a bank account that can be used for loan disbursements, repayments, and fund transfers.
https://{your-domain}.fincode.software/api/v1/services/user/create-bank-account
Request Headers
string
required
The JWT Access Token obtained from the
/login or /refresh-token endpoint.string
required
Unique idempotency key for the request to prevent duplicate processing.
string
required
The date and time at which the request was initiated (ISO 8601 format).
string
required
The IP address of the customer making the request.
string
required
Unique identifier for the interaction/session.
string
default:"application/json"
required
Must be
application/json.Request Body
string
required
The unique identifier (UUID) of the customer adding the bank account.
string
required
Bank account number.
string
required
Name of the account holder as it appears on the bank account.
string
required
Code identifying the bank.
string
required
Name of the bank.
string
Type of account (e.g.,
SAVINGS, CURRENT, CHECKING).boolean
Whether this should be set as the default bank account.
Response
Returns confirmation of bank account creation with account details.string
default:"SUCCESS"
Overall status of the API request.
object
Bank account details.
Show data object
Show data object
Code Examples
curl --location --request POST 'https://{your-domain}.fincode.software/api/v1/services/user/create-bank-account' \
--header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
--header 'x-idempotency-key: unique-key-12345' \
--header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
--header 'x-fapi-customer-ip-address: 192.168.1.1' \
--header 'x-fapi-interaction-id: interaction-12345' \
--header 'Content-Type: application/json' \
--data '{
"customerId": "123e4567-e89b-12d3-a456-426614174000",
"accountNumber": "1234567890",
"accountName": "John Doe",
"bankCode": "058",
"bankName": "Guaranty Trust Bank",
"accountType": "SAVINGS",
"isDefault": true
}'
const axios = require('axios');
const BASE_URL = 'https://{your-domain}.fincode.software/api/v1/services/user';
async function createBankAccount(accessToken, accountData) {
try {
const response = await axios.post(
`${BASE_URL}/create-bank-account`,
{
customerId: accountData.customerId,
accountNumber: accountData.accountNumber,
accountName: accountData.accountName,
bankCode: accountData.bankCode,
bankName: accountData.bankName,
accountType: accountData.accountType || 'SAVINGS',
isDefault: accountData.isDefault || false,
},
{
headers: {
'X-Auth-Token': accessToken,
'x-idempotency-key': `key-${Date.now()}`,
'x-fapi-auth-date': new Date().toISOString(),
'x-fapi-customer-ip-address': '192.168.1.1',
'x-fapi-interaction-id': `interaction-${Date.now()}`,
'Content-Type': 'application/json',
},
}
);
return response.data.data;
} catch (error) {
console.error(
'Failed to create bank account:',
error.response?.data || error.message
);
throw error;
}
}
// Usage Example
const accessToken = 'YOUR_JWT_ACCESS_TOKEN';
createBankAccount(accessToken, {
customerId: '123e4567-e89b-12d3-a456-426614174000',
accountNumber: '1234567890',
accountName: 'John Doe',
bankCode: '058',
bankName: 'Guaranty Trust Bank',
accountType: 'SAVINGS',
isDefault: true,
});
