Demo and Real Gameplay
Gameplay overview
When building an integration with Hub88 you can start with setting up DEMO mode to ensure that all data communication flows correctly.
To start setting up the full gameplay, either in DEMO mode or Real mode, you'll need to meet the prerequisites outlined in Getting Started and get acquainted with the API in Operator API Overview.
The gameplay logic will process is as follows with API call modifications needed for DEMO mode.
Note that the process is different for DEMO and REAL gameplay modes.
In DEMO mode, user can open the game, check the rules/graphics, and play with fun mode money.
Obtain a game URL from Hub88 by calling POST /operator/generic/v2/game/url .
Direct the customer to the URL provided by Hub88.
Respond to in-game events sent by Hub88 and update the customer's balance (SEAMLESS WALLET ONLY)
The high level gameplay corresponds to the core communications flow between Supplier and Operator APIs.
Demo gameplay
Note that the process is different for DEMO and REAL gameplay modes.
In DEMO mode, user can open the game, check the rules/graphics, and play with demo mode money.
Operator makes a Game API call to POST /operator/generic/v2/game/url to obtain game launch URL.
For DEMO mode, Operator has to pass "currency":"XXX".
Parameters token, user can be omitted.
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 the 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.
Real gameplay
The Operator generates and stores a unique game session token.
The Operator makes a Game API call POST /operator/generic/v2/game/url and passes the generated token along with the other request parameters.
NB!: In case of SEAMLESS WALLET integration, Operator needs to be ready to respond to balance API calls 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 the player to the URL).
Following steps are for SEAMLESS WALLET integration only. In case of Transfer Wallet integration, all game actions and balance updates will be handled on Hub88 side.
When the game URL is loaded in the browser, Hub88 server makes a Wallet API call /user/balance to the Operator's server.
The 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.
The Operator verifies the token, increases the user's balance by the win amount, and returns the updated user's balance.
Behaviour in case of user's loss depends on game provider's internal logic. Possible options:
Nothing is sent
Sent win with amount 0
Last updated
Was this helpful?

