/api/v2/server-side-api/vc/balances/ List virtual currency balances
Returns the current balance of every virtual currency for a profile. If the app has no virtual currencies, data is an empty array.
Header parameters
The unique ID of the customer in your system. Either adapty-customer-user-id or adapty-profile-id is required.
The unique ID of the profile in your system. Your best option if you are working with anonymous profiles. Either adapty-customer-user-id or adapty-profile-id is required.
Responses
Balances returned successfully
Schema
Current balances for all virtual currencies of a profile.
When the response was generated, as a Unix timestamp in milliseconds.
Unique virtual currency code within the app. ASCII letters, digits, and underscore.
Display name of the virtual currency.
Total balance, including amounts currently held.
Sum of all active holds (reserved amounts). Currently always 0.
Balance available to spend, computed as balance - held.
Example
{
"response_created_at": 1779791400000,
"data": [
{
"code": "COINS",
"name": "Gold Coins",
"balance": 12450,
"held": 0,
"available": 12450
},
{
"code": "GEMS",
"name": "Gems",
"balance": 3280,
"held": 0,
"available": 3280
},
{
"code": "ENERGY",
"name": "Energy",
"balance": 840,
"held": 0,
"available": 840
}
]
} Bad request.
Schema
Source of the error
Array of error messages
Short error name
HTTP status code
Unauthorized. The API key is missing or invalid.
Schema
Source of the error
Array of error messages
Short error name
HTTP status code
Forbidden. The Server API for virtual currencies is not enabled for this app.
Schema
Source of the error
Array of error messages
Short error name
HTTP status code
Profile not found.
Schema
Source of the error
Array of error messages
Short error name
HTTP status code
Internal server error