# Balance

## Check Balance

<mark style="color:blue;">`GET`</mark> `https://api.oneappgo.com/v1/balance`

#### Headers

| Name                                            | Type   | Description                      |
| ----------------------------------------------- | ------ | -------------------------------- |
| authorization<mark style="color:red;">\*</mark> | String | Set value to `Bearer SECRET_KEY` |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "status": true,
    "message": "Account Balance Retrieved",
    "ledger_bal": "0.00",
    "available_bal": "34602.11",
    "currency": "NGN",
    "acctlist": [
        {
            "bankname": "Providus Bank",
            "acctname": "1APP(John Doe)",
            "accountnumber": "1234567890"
        },
        {
            "bankname": "Fidelity bank",
            "acctname": "John Doe",
            "accountnumber": "4550589796"
        },                
    ]
}
```

{% endtab %}
{% endtabs %}

Take a look at how you might do this:

{% tabs %}
{% tab title="cURL" %}

```
curl --location --request GET 'https://api.oneappgo.com/v1/balance' \
--header 'Authorization: Bearer SECRET_KEY'
```

{% endtab %}

{% tab title="NodeJs" %}

```
var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://api.oneappgo.com/v1/balance',
  'headers': {
    'Authorization': 'Bearer SECRET_KEY'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.oneappgo.com/v1/balance',
  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 SECRET_KEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endtab %}

{% tab title="Python" %}

```
import requests

url = "https://api.oneappgo.com/v1/balance"

payload={}
headers = {
  'Authorization': 'Bearer SECRET_KEY'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="Dart" %}

```
var headers = {
  'Authorization': 'Bearer SECRET_KEY'
};
var request = http.Request('GET', Uri.parse('https://api.oneappgo.com/v1/balance'));

request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

```

{% endtab %}
{% endtabs %}

### Sample Response

```json
{
    "status": true,
    "message": "Account Balance Retrieved",
    "ledger_bal": "0.00",
    "available_bal": "34602.11",
    "currency": "NGN",
    "acctlist": [
        {
            "bankname": "Providus Bank",
            "acctname": "1APP(John Doe)",
            "accountnumber": "1234567890"
        },           
        {
            "bankname": "Kuda Bank",
            "acctname": "1APP(Paul Doe)",
            "accountnumber": "2345678900"
        },  
    ]
}
```
