Operator Documentation 1.0.0
OAS 3.0
https://vegangster.com/static/files/Vegangster_Operator_API.yamlRequest signing
All Games API requests have to be signed by Operator.
All Wallet API requests have to be signed by Vegangster.
All Freegames API requests must be signed by the Operator.
Before the integration, the Operator generates a private/public key pair and sends the public key to Vegangster. Vegangster sends its public key to the Operator. The body of all requests will be signed with RSA-SHA256 using the respective private key and encoded to BASE64. The signature will be placed in the X-API-Signature header. The Operator needs to verify all Wallet API requests using the public key provided by Vegangster. Vegangster verifies all Games and Freegames API requests using the public key provided by the Operator.
Example of signature generation
Request body:
{"player_id": "64651509b8c355917ec34421", "token": "64651582b8c355917ec34422", "game_code": "the_best_game", "platform": "desktop", "currency": "USD", "lang": "en", "country": "US", "ip": "145.22.35.62", "lobby_url": "https://my-great-casino.com/lobby", "deposit_url": "https://my-great-casino.com/deposit", "player_nick": "xXx_pro100Max_xXx"}
Private key: link
Correct signature:
UCbyafCe3Pxv9FQmT8e7sY8eFYuNTrdGyXnA3B6Ihrd1eP+OpRqqjnNq6/aY2LLbPYi5JnOUhLZlGpMTxMwvQGH+k/E7xAdFhjuli/U+J06uMq/Vy5uXMUpRNHk4p5A3lDNQtpBozeAC6zIPUjFPT5L+9HoI5i1LY1q6PS1d5/k=
Code example in Python: link
Request consistency
Wallet API requests have to be idempotent. All transactions contain a transaction_id
field. Operator has to ensure that requests with the same transaction_id
are not processed twice while the response has to be same for all duplicate requests.
Gameplay
Once you meet the prerequisites, the process is as follows:
- Obtain a game URL from Vegangster.
- Direct the customer to the URL provided by Vegangster.
- Respond to in-game events sent by Vegangster and update the customer's balance
Note that the process is different for DEMO and REAL gameplay modes. In DEMO mode, user can open the game, check the rules/graphics/paytable, and play with fun mode money. Not all game providers allow DEMO gameplay (none of Live Dealers allow it).
Below is an example of interaction flow to open the game in DEMO mode:
- Operator makes a Game API call to
/operator/v1/game/demo/url
to obtain game launch URL. - When the game URL is returned, the Operator uses it to direct the player to the game (for example, launch it in iframe or redirect player to the URL).
- In DEMO mode, no calls to Operator's API are made because providers handle the balance themselves. If player liked the game and wants to switch to REAL mode, Operator should proceed with the next steps.
Below is an example of interaction flow between the customer, operator, Vegangster, and game provider in REAL mode:
- Operator generates and stores a unique game session token.
- Operator makes a Game API call
/operator/v1/game/url
and passes the generated token along with the other request parameters. NOTE: Operator needs to be ready to respond to/player/info
Wallet API call even before getting the game URL back. - When the game URL is returned, the Operator uses it to direct the player to the game (for example, launch it in iframe or redirect player to the URL).
- When the game URL is loaded in the browser, Vegangster server makes a Wallet API call
/player/info
(or/player/balance
depends on provider) to the Operator's server. - Operator verifies the token against the stored token and returns the user's balance. The user can then place a bet.
- When the user attempts to place a bet, a Wallet API call
/transaction/bet
is triggered on the Operator's server. - The Operator verifies the token, ensures that the user has enough money for this bet, decreases the user's balance by the bet amount, and returns the updated user's balance.
- If the user wins, the Wallet API triggers a call
/transaction/win
on the Operator's server. - Operator verifies the token, increases the user's balance by the win amount, and returns the updated user's balance.
Wallet API Response statuses
Status | Description |
OK | Successful response. |
ERROR_GENERAL | General error status, for cases without a special error code. |
ERROR_INVALID_DATA | The data passed in request body doesn't match with the model |
ERROR_INVALID_BRAND | Passed brand is incorrect |
ERROR_INVALID_TOKEN | Token unknown to Operator's system. Please, note that there is a different status for expired tokens. |
ERROR_INVALID_GAME | Unknown game_code |
ERROR_BLACKLISTED_COUNTRY | Operations in given country are unavailable |
ERROR_WRONG_CURRENCY | Transaction currency differs from Player's wallet currency. |
ERROR_NOT_ENOUGH_MONEY | Not enough money on Player's balance to place a bet. Please send the actual balance together with this status. |
ERROR_USER_DISABLED | Player is disabled/locked and can't place bets. |
ERROR_INVALID_SIGNATURE | Operator couldn't verify signature on request from Vegangster. |
ERROR_TOKEN_EXPIRED | Session with specified token has already expired. NOTE: token validity MUST NOT be validated in case of wins and rollbacks, since they might come long after the bets. |
ERROR_TRANSACTION_DOES_NOT_EXIST | Returned when the bet referenced in win request can't be found on Operator's side (wasn't processed or was rolled back). If you received rollback request and can't find the transaction to roll back, respond OK |
ERROR_TRANSACTION_EXISTS | A transaction with same transaction_id was sent |
ERROR_ROUND_DOES_NOT_FOUND | Transaction with the given round_id can't be found on Operator's side |
ERROR_FREEGAME_NOT_FOUND | Transaction with the given freegames_reference can't be found. |
ERROR_SESSION_BLOCKED | MGA LICENSE ONLY: session has been blocked due to responsible gaming guidelines |
Sports APIVegangster provides several methods for the Operator to display sports games on the Operator’s website.
Vegangster provides several methods for the Operator to display sports games on the Operator’s website.
Games APIVegangster provides several methods for the Operator to display games on the Operator’s website.
Vegangster provides several methods for the Operator to display games on the Operator’s website.
Wallet APIOperator is expected to provide API for Vegangster calls. API should process the described requests from Vegangster.
Operator is expected to provide API for Vegangster calls. API should process the described requests from Vegangster.
Freegames APIFreegames API lets you grant rewards (freespins, freebets, prizes) to a single player or several players. First-time-player bonuses are supported by most providers. In some cases, before granting a free bet a player must interact with the game to properly use it.
Freegames API lets you grant rewards (freespins, freebets, prizes) to a single player or several players. First-time-player bonuses are supported by most providers. In some cases, before granting a free bet a player must interact with the game to properly use it.
Subscribe to get our news
