curl https://api.zbdpay.com/api/v1/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/balances \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Balances retrieved.",
"data": {
"user_id": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"balances": [
{ "currency": "USD", "available": 5000, "cashable": 3000 },
{ "currency": "GEMS", "available": 1700, "cashable": 0 }
]
},
"error": null
}
Earnings
Get Balances
Read the balances ZBD holds for a user, in each currency.
GET
/
api
/
v1
/
users
/
{userId}
/
balances
curl https://api.zbdpay.com/api/v1/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/balances \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Balances retrieved.",
"data": {
"user_id": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"balances": [
{ "currency": "USD", "available": 5000, "cashable": 3000 },
{ "currency": "GEMS", "available": 1700, "cashable": 0 }
]
},
"error": null
}
Only for programs where ZBD tracks earnings. If you track earnings yourself, this returns
403 feature_not_enabled.Configuration
Header Parameters
Path Parameters
curl https://api.zbdpay.com/api/v1/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/balances \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Balances retrieved.",
"data": {
"user_id": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"balances": [
{ "currency": "USD", "available": 5000, "cashable": 3000 },
{ "currency": "GEMS", "available": 1700, "cashable": 0 }
]
},
"error": null
}
Response
The part of
available the user can cash out now. It depends on how the value arrived, so it can be less than available.Errors
| HTTP | code | When |
|---|---|---|
403 | feature_not_enabled | You track earnings yourself |
404 | user_not_found | The user doesn’t exist under your key |
Was this page helpful?