The Balance request is used for receiving the information about the player's balance.
All currency communication between the Operator and RubyPlay is done in units of that particular currency. For example, if a user has a USD balance 500.45 in his wallet, then the balance field in the response body must be:
{
...
"balance": 500.45
...
}API Call Sample:
- Generated server url.http://integrator-gaming-platform.io/rest/v1/api/balance
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
http://integrator-gaming-platform.io/rest/v1/api/balance \
-H 'Content-Type: application/json' \
-d '{
"sessionToken": "0Ja8M7KvY",
"playerId": "24681",
"promotionId": "123456",
"externalCampaignId": "123456",
"currencyCode": "EUR",
"gameId": "rp_12",
"country": "US"
}'{ "code": "0", "description": "Success", "balance": 500.45 }
Request Schema:
Login session token, provided by the Operator side. Used in all requests initiated by RubyPlay (the RGS) when invoking the Operator GP service.
Unique player ID on the Operator side.
The ID of the campaign if a free round is reported. The wallet is expected to return the promotion balance for the specified promotionId along with its status, even if the campaign is no longer available (completed or expired).
External ID of the campaign if a free round is reported and the external ID was set during the campaign creation.
Currency used by the current player.
Unique game ID on the Operator side.
ISO 3166-1 alpha 2 country code. It corresponds to a country the played launched the game from, defined by client IP of the game init request.
Response Schema:
Response code.
Short description of the response code.
The player's balance in the currency which was sent in the currencyCode field of the Balance request.