Skip to Content
WalletSeamless WalletGet User Balance

get-user-balance

The Sportsbook BE calls this endpoint to check whether the player has enough money to place a bet, and to calculate the maximum possible bet amount. See Integration for the rules shared by all three wallet endpoints.

Request

GET /api/v2/wallet/{playerId}/balances

Request parameters:

NameInTypeRequiredDescription
playerIdPathstringrequiredId of player
currenciesQuerystringoptionalcurrencies that will be returned in response. Optional parameter, by default, all available currencies are returned.
X-BrandHeaderstringrequiredOne of tenant identifiers which represent site and operator. They will be configured during the tenant setup process and can’t be changed. Get this value from your GR8 Tech manager.
X-Operator-IdHeaderstringrequiredOne of tenant identifiers which represent site and operator. They will be configured during the tenant setup process and can’t be changed. Get this value from your GR8 Tech manager.

Success response

Caution

Please, pay attention, that values for “locked” and “bonus” should be ALWAYS 0 (ZERO) if you have not integrated with our bonus services

Success response json schema

{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { // platform "sport": { "type": "object", "properties": { // product "main": { "$ref": "#/definitions/productBalancesType" }, "sportsbook": { "$ref": "#/definitions/productBalancesType" } }, "required": ["main", "sportsbook"] } }, "definitions": { "productBalancesType": { "type": "object", "patternProperties": { "^.*$": { // currency "$ref": "#/definitions/balancesType" } } }, "balancesType": { "type": "object", "properties": { "cash": { "type": "string" }, // required "bonus": { "type": "string" }, // required "locked": { "type": "string" }, // required "retract": { "type": "string" } }, "required": ["cash", "bonus", "locked"], "additionalProperties": false } } }
Single-currency response example
{ "sport": { "main": { "USD": { "cash": "500", // <-- it’s a real player’s money "bonus": "0", // <-- should be ALWAYS 0 (ZERO), because it is used only with our sportsbook bonus services "locked": "0" // <-- should be ALWAYS 0 (ZERO), because it is used only with our sportsbook bonus services } }, "sportsbook": { "USD": { "cash": "500", // <-- it’s a real player’s money "bonus": "0", // <-- should be ALWAYS 0 (ZERO), because it is used only with our sportsbook bonus services "locked": "0" // <-- should be ALWAYS 0 (ZERO), because it is used only with our sportsbook bonus services } } } }
Multi-currency Response example
{ "sport": { "main": { "USD": { "cash": "500", "bonus": "0", "locked": "0" }, "EUR": { "cash": "250", "bonus": "0", "locked": "0" }, "GBP": { "cash": "100", "bonus": "0", "locked": "0" } }, "sportsbook": { "USD": { "cash": "500", "bonus": "0", "locked": "0" }, "EUR": { "cash": "250", "bonus": "0", "locked": "0" }, "GBP": { "cash": "100", "bonus": "0", "locked": "0" } } } }
Caution

ATTENTION!
Get balance request will be always executed after EACH transaction request by default. If you want to disable it, please contact the AM/PM of GR8 TECH team

Error response

Error response schema

{ "type": "object", "properties": { "error": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "origin": { "type": "string" } }, "additionalProperties": true, "required": ["code", "message", "origin"] }, "additionalProperties": true, "required": ["error"] } }
Error response example
{ "error": { "code": "error.user.not-found", "message": "User with specified Id was not found", "origin": "Set your company name" }, "alreadyProcessed": false }
Note

The “Wallet error codes” section describes the list of possible errors.

Load expectations

The Sportsbook uses this endpoint when calculating the max possible bet amount after the player clicks the “Max“ button in the betslip. So NFRs to this endpoint depend on the users’ activity. Our experience shows us that the expected load of this endpoint is near 20 requests per second.

max-bet-amount

In case of an error response - the max bet amount will be calculated only based on the current limitations of the system and previous players’ bets.