General connection information
Terms:
-
Platform
- a set of software tools that provides aPartner
with access to games through the API described in this documentation. -
Partner
- an external platform that connect to thePlatform
. It can be represented by a game aggregator or a standalone website that integrates directly. -
Control Panel
- Additional information on connecting to the Platform is available in the Control Panel, as well as other settings that can be configured by a Partner. A set of functions is negotiated for each specificPartner
individually. Access to the Control Panel is carried out using thePartner ID
and password issued upon connection. The password can be changed by contacting technical support. -
Partner ID
- alphanumeric sequence of characters. Only lowercase Latin letters can be used as characters.([a-z][a-z0-9]{2,12})
-
Secret Key
- used to sign requests from the Platform to a Partner. This key is set in thePartner's
Control Panel. -
Signature
- MD5 hash obtained from the request parameters and theSecret Key
. Signature is used by aPartner
to verify the validity of requests from thePlatform
to aPartner
Player
- a user who launched a game.
Denomination:
- Denominator - the price of the game coin relative to the player's currency
- In the system, the denominator is indicated in hundredths. So for a coin price equal to one unit of the player's currency, the denomination value should be 1.00, which is 100 in hundredths.
-
Examples of available denominations (the list can be configured individually for a Partner).
- 1 = 0.01
- 5 = 0.05
- 10 = 0.1
- 25 = 0.25
- 50 = 0.5
- 100 = 1
- 500 = 5
- 1000 = 10
- 2000 = 20
Integration example (php):
Connecting a Partner
to the Platform
.
Preliminary steps:
- Each
Partner
is assigned aPartner ID
, which is negotiated before connecting to thePlatform
. - Each
Partner
receives a password that is used to access theControl Panel
along withPartner ID
. Secret Key
can be set and changed by aPartner
an theControl Panel
at any time independently.
Practical connection steps:
- Create a custom designed web page containing an iframe for loading an integrated game - Example
- Use the Platform API to get a list of games, currencies, as well as to start a game session
- Implement the work of methods on a Partner's side in accordance with the Partner's API
- An example implementation of integration for PHP.
How to work with the API (Workflow):
-
Make a request to the
Platform
to initialize a session
For a REAL session/init.session
, the passed parameters are:currency: string
- Game session currencygame.id: number
- Game ID on the Platform sidepartner.alias: string
- Partner ID (Login of Subagent)partner.session: string
- Player session ID generated by a Partner
/init.session
, the passed parameters are:currency: string
- Game session currencyfreerounds.id: string
- Freerounds IDgame.id: number
- Game ID on the Platform sidepartner.alias: string
- Partner ID (Login of Subagent)partner.session: string
- Player session ID generated by a Partner
/init.demo.session
, the passed parameters are:currency: string
- Game session currencygame.id: number
- Game ID on the Platform sidebalance: number
- Balance in cents (hundredths)denomination: number
- (Optional) Game session Denominator in hundredths. If not specified, the default value is 100
-
Get configuration
for a REAL session
- While processing a request to initialize a session, the
Platform
sends 2 requests to aPartner
:/check.session
and/check.balance
to check that the request has been initialized by aPartner
, as well as to receive a session parameters. - If the request check is successful, the
Platform
sends a configuration to a partner to launch a game
for a REAL session with FREEROUNDS
- During the processing of the session initialization request, the
Platform
sends 3 requests to aPartner
:/check.session
,/freerounds.activate
and/check.balance
to check that the request has been initialized by aPartner
, as well as to receive a session parameters. - If the request check is successful, the
Platform
sends a configuration to a partner to launch a game - When activating freerounds, remember the following features:
-
If an error occurs with any of the 3 above requests, then the
Platform
will consider the freerounds as NOT activated. Including if a request to /freerounds.activate was successful. - A player cannot activate freerounds for a game in which freerounds are already activated.
- If a game has an unfinished turn, an unfinished feature and/or active free spins (not freerounds), all these features will be forcibly completed, and the winnings for them will be sent with the /deposit.win request immediately after the /check.balance request.
- Freerounds are always activated with a maximum number of lines and a minimum bet to play. More about freerounds and how to manage a amount of winnings on them
-
If an error occurs with any of the 3 above requests, then the
for DEMO session
- The
Platform
sends a configuration to a Partner immediately to launch a game without any requests - Features of the demo sessions:
- Points 4 and 5 of the "How to work with the API (Workflow)" do not apply to demo sessions
- Demo sessions send absolutely no requests to a Partner during its work
- It is impossible to top up demo session balance
- It is impossible to track a status (for example, balance, number of turns, winnings, etc.) of a demo session
- It is not possible to activate freerounds for demo sessions
- Demo sessions do not need to be closed with
/close.session
- While processing a request to initialize a session, the
-
Launching a game by
Partner
using the configuration received from thePlatform
. The mechanism for obtaining a link for an iframe from the Parameters is described in detail in the section Launching an integrated game -
Processing of the game turns by the
Platform
. ThePlatform
generates 2 requests to aPartner
for each turn of aPlayer
/withdraw.bet
- withdrawal of a bet from a player's balance. Withdrawal occurs before the visualization of a result/deposit.win
- enrollment of winnings per turn to a balance. This request is sent even if the payoff is zero. This request is sent after a final calculation of the winnings for a game turn.
So, for example, if a game has bonuses, free spins and/or a double feature, then a final calculation of the winnings occurs after completion of these features.
Partner
sends a session balance on its side, and thePlatform
checks it with its own data. Thus, the balance matching mechanism is guaranteed both on the Platform side and on the Partner side at any time. -
Error handling by the
Platform
. All error handling operations make several connection attempts and, in the absence of a correct response from aPartner
, require a manual start to complete a turn./trx.cancel
- notification about error while withdrawal from a balance and canceling this transaction/trx.complete
- notification about error while enrollment the winnings to a player.
Launching an integrated game:
-
Getting a configuration to launch:
- Run a game session initialization request (
/session.demo.init
- for a demo session/session.init
- for a real session) - In the body of the response to the request, the "response" parameter will contain a JSON object of the following form
{ "casinoBrand": "some", "clientDist" : "https://example.com", "token" : "85520955afda57b28905181593440dbb", "targetElement": "game" }
- To get a URL to launch a game, you need to combine the parameter values in the following way:
{clientDist}?t={token}
The result will be a link like this - Set the resulting link to a src attribute of a target iframe
https://example.com?t=85520955afda57b28905181593440dbb
<iframe src="https://example.com?t=85520955afda57b28905181593440dbb"></iframe>
- Run a game session initialization request (