API Documentation for NG Banks Functionality
This documentation provides step-by-step guidance for developers to integrate functionalities for fetching banks using PHP cURL or NodeJs. Each section includes the method, endpoint, request parameters, and sample responses.
GET https://mybundlepay.com/ng/api/v2/banks
HEADERS
Authorization* string
Pass your {secret_key} as a bearer token in the request header to authorize this call
Accept application/json
< ?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://mybundlepay.com/ng/api/v2/banks");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer {secret_key}',
'Accept: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
const axios = require('axios');
const url = 'https://mybundlepay.com/ng/api/v2/banks';
const apiKey = '{secret_key}'; // Replace with your actual API key
axios.get(url, {
headers: {
'Authorization': `Bearer ${apiKey}`,
'Accept': 'application/json'
}
})
.then(response => {
console.log(response.data); // Prints the response data
})
.catch(error => {
console.error('Error:', error); // Handles any error that occurs during the request
});
Response
{
"status": "success",
"message": "Banks fetched successfully",
"data": [
{
"name": "OPTIMUS BANK",
"bankcode": "000036"
},
{
"name": "KEYSTONE BANK",
"bankcode": "000002"
}
]
"mode": "live",
}