curl https://api.zbdpay.com/api/v1/widget/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/balance \
-H "apikey: YOUR_API_KEY"
{
"userId": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"balances": [
{
"currency": "USD",
"availableBalance": 5000,
"totalBalance": 5000
}
]
}
API Reference
Get User Balance
Retrieve a widget user’s available and total reward balance.
GET
/
api
/
v1
/
widget
/
users
/
{user_id}
/
balance
curl https://api.zbdpay.com/api/v1/widget/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/balance \
-H "apikey: YOUR_API_KEY"
{
"userId": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"balances": [
{
"currency": "USD",
"availableBalance": 5000,
"totalBalance": 5000
}
]
}
Description
Returns the user’s widget reward balance for your project. Use this from your server when you need to show a user’s cashout-ready balance outside the widget. Amounts are returned in currency minor units. For USD,100 equals $1.00.
Configuration
Header Parameters
string
required
Your ZBD project API key (production scope).
Path Parameters
string
required
The ZBD user ID returned by Create User.
curl https://api.zbdpay.com/api/v1/widget/users/4ac4fd8a-cc2c-4d03-af09-a76f4e89d652/balance \
-H "apikey: YOUR_API_KEY"
{
"userId": "4ac4fd8a-cc2c-4d03-af09-a76f4e89d652",
"balances": [
{
"currency": "USD",
"availableBalance": 5000,
"totalBalance": 5000
}
]
}
Was this page helpful?