# eSIM API - Account Balance

> To get the remaining balance of your funds, you need to send a GET request to the /api/balance endpoint.

Canonical: https://docs.getroamify.com/esims/balance/

## Account Balance
To get the remaining balance of your funds, you need to send a `GET` request to the `/api/balance` endpoint.

There are no required parameters for this endpoint.

## Usage - fetch account balance
Here is an example of how you can get the remaining balance of your funds using Roamify eSIM API.

**curl**

```bash
curl --request GET \
--url 'https://api-dev.getroamify.com/api/balance' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json'
```

**javascript**

```javascript
const axios = require('axios');

axios.get('https://api-dev.getroamify.com/api/balance', {
    headers: {
        'Authorization': 'Bearer {access token here}',
        'Content-Type': 'application/json'
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});
```

## Sample Response
```json
{
	"status": "success",
	"data": {
		"balance": 3723.35,
		"currency": "USD"
	}
}
```
