You can use it to get the account name of any bank account in Nigeria
# Real-time Nigeria Bank Account validation API.
You can lookup any bank account details in Nigeria using our free bank API in few seconds to build applications faster and easy.
- Lifetime Access. Unlimited Account Lookups
- Enter account number and get the name and bank
- Enter account number and bank code to get the account name
- Real-time Nigeria Bank Account Validation API Tutorial
## Demo
nubapi.com
## Documentation
maylancer.org
## API Link
```
nubapi.com
```
Without bank code
```
nubapi.com
```
## Code Sample
```php
/**
* Makes an API call using cURL.
*
* @param string $method The HTTP method (POST, PUT, GET).
* @param string $url The API URL.
* @param mixed $data The data to be sent with the request.
* @return mixed The API response.
* @throws Exception If the cURL request fails.
*/
function callAPI($method, $url, $data) {
$curl = curl_init();
// Set cURL options based on the HTTP method
switch ($method) {
case "POST":
curl_setopt($curl, CURLOPT_POST, 1);
if ($data)
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
break;
case "PUT":
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
if ($data)
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
break;
default:
if ($data)
$url = sprintf("%s?%s", $url, http_build_query($data));
}
// Set common cURL options
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'Authorization: Bearer Your_Bearer_Token' // Replace with your actual Bearer token
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPAUTH => CURLAUTH_BASIC
]);
// Execute the cURL request
$result = curl_exec($curl);
// Check for cURL errors
if ($result === false) {
$error = curl_error($curl);
curl_close($curl);
throw new Exception("cURL Request Failed: $error");
}
curl_close($curl);
return $result;
}
// Define the API endpoint URL
$url = '
nubapi.com …