Skip to content

User Balance

POST https://{PARTNER_API_URL}/user/balance

This request will be performed to refresh user balance and currency data on frontend. We will poll this endpoint periodically starting from the moment the user loads Sportsbook iFrame. When you receive a request you should perform the following actions on your side:

  • Check that the method is POST.
  • Verify request signature.
  • Verify user token.
  • Respond with a current user balance in requested currency

Request examples

json
{
  "userId": "1999",
  "currency": "USD",
  "token": "5caa4cabce523c2f7610c50ce9819bfb",
  "requestId": "d9195aef-9492-43dd-88d0-dc1732a37f4e"
}

The table below describes the parameters:

ParameterTypeValidationDescription
tokenstring
length: 10-64
A string that you generating for each user session to be able to identify and authorize user on backend. The string is passed during frame initialization in the SDK parameters.
userIdstringlength: 1-64The user’s unique ID on the Partner’s platform.
currencystringlength: 3-5The currency code of the user’s account.
The currency code must be specified in ISO 4217 (EUR, USD, RUB, and so on).
amountfloatThe amount with a dot separator.

Response examples

json
{
  "userId": "1999",
  "currency": "USD",
  "amount": 1290.1
}