Balance
You can check your account balance, bank account associated/allocated to your account.
get
https://api.1app.online/v1/balance
Check Balance
Take a look at how you might do this:
cURL
NodeJs
PHP - cURL
Python
Dart
1
curl --location --request GET 'https://api.1app.online/v1/balance' \
2
--header 'Authorization: Bearer SECRET_KEY'
Copied!
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://api.1app.online/v1/balance',
5
'headers': {
6
'Authorization': 'Bearer SECRET_KEY'
7
}
8
};
9
request(options, function (error, response) {
10
if (error) throw new Error(error);
11
console.log(response.body);
12
});
13
Copied!
1
$curl = curl_init();
2
3
curl_setopt_array($curl, array(
4
CURLOPT_URL => 'https://api.1app.online/v1/balance',
5
CURLOPT_RETURNTRANSFER => true,
6
CURLOPT_ENCODING => '',
7
CURLOPT_MAXREDIRS => 10,
8
CURLOPT_TIMEOUT => 0,
9
CURLOPT_FOLLOWLOCATION => true,
10
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
11
CURLOPT_CUSTOMREQUEST => 'GET',
12
CURLOPT_HTTPHEADER => array(
13
'Authorization: Bearer SECRET_KEY'
14
),
15
));
16
17
$response = curl_exec($curl);
18
19
curl_close($curl);
20
echo $response;
Copied!
1
import requests
2
3
url = "https://api.1app.online/v1/balance"
4
5
payload={}
6
headers = {
7
'Authorization': 'Bearer SECRET_KEY'
8
}
9
10
response = requests.request("GET", url, headers=headers, data=payload)
11
12
print(response.text)
13
Copied!
1
var headers = {
2
'Authorization': 'Bearer SECRET_KEY'
3
};
4
var request = http.Request('GET', Uri.parse('https://api.1app.online/v1/balance'));
5
6
request.headers.addAll(headers);
7
8
http.StreamedResponse response = await request.send();
9
10
if (response.statusCode == 200) {
11
print(await response.stream.bytesToString());
12
}
13
else {
14
print(response.reasonPhrase);
15
}
16
Copied!

Sample Response

1
{
2
"status": true,
3
"message": "Account Balance Retrieved",
4
"ledger_bal": "0.00",
5
"available_bal": "34602.11",
6
"currency": "NGN",
7
"acctlist": [
8
{
9
"bankname": "Providus Bank",
10
"acctname": "1APP(John Doe)",
11
"accountnumber": "1234567890"
12
},
13
{
14
"bankname": "Sterling bank",
15
"acctname": "MONNIFY / 1app-John Doe",
16
"accountnumber": "01234567890"
17
},
18
19
]
20
}
Copied!