Verify Account Number
Confirm that account number is valid before sending money
get
{{base_url}}/validate-acctname
Validate account number
Take a look at how you might do this:
cURL
NodeJS
PHP - cURL
Python
Dart
curl --location --request GET 'https://api.1app.online/v1/validate-acctname?acctno=0123456789&bankcode=000013' \
--header 'Authorization: Bearer PUBLIC_KEY'
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.1app.online/v1/validate-acctname?acctno=0123456789&bankcode=000013',
'headers': {
'Authorization': 'Bearer PUBLIC_KEY'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.1app.online/v1/validate-acctname?acctno=0123456789&bankcode=000013',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer PUBLIC_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.1app.online/v1/validate-acctname?acctno=0123456789&bankcode=000013"
payload={}
files={}
headers = {
'Authorization': 'Bearer PUBLIC_KEY'
}
response = requests.request("GET", url, headers=headers, data=payload, files=files)
print(response.text)
var headers = {
'Authorization': 'Bearer PUBLIC_KEY'
};
var request = http.MultipartRequest('GET', Uri.parse('https://api.1app.online/v1/validate-acctname?acctno=0123456789&bankcode=000013'));
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}

Sample Response

{
"status": true,
"account_name": "AKINDELE CHIOMA HASSAN",
"msg": "Account name resolved"
}