Free Games
Overview
Open game api supports free games processing. This page describes steps of integration for providers.
How to enable free games support
You have to provide games.freeGames object with related possibleBets and possibleLines data.
| Name | Type | Description |
|---|---|---|
games.freeGames | object | [Optional field] Free games info |
games.freeGames.possibleBets | list | List of possible bets |
games.freeGames.possibleLines | list | List of possible lines |
Example
{
"freeGames": {
"possibleBets": [
1,
2,
3,
4,
5,
10,
20,
30,
40,
50,
100
],
"possibleLines": [
1,
20,
30,
50,
100
]
}
}
Available Free Games
Available free bets data for session is provided with balance response. Also, with every operation response you will receive actual balance and available free games data.
| Name | Type | Description |
|---|---|---|
api | string | Name of operation, “balance” in this case |
data | object | |
data.userNick | string | User’s nick |
data.amount | long | User balance (Example: 10000 = 100.00EUR) |
data.denomination | int | Currency denomination. Basically for fiat it equals 2 (for example 1 USD = 100 cents) |
data.currency | string | Balance currency. Passed by the link to open the game. See section “Managing Games and Connections”, field accounts[].gameEmbedUrl. |
data.userId | string | A unique user id |
data.jpKey | string | Jackpot accumulation group id. Players with the same jpKey participate in a single pool of savings and jackpot winnings |
data.freeGames | list | Information about available bonuses. |
data.freeGames.bonusId | string | A bonus id |
data.freeGames.games | list | List of available games |
data.freeGames.games.id | string | Game id |
data.freeGames.games.initial | int | Number of spins/bets at bonus init |
data.freeGames.games.left | int | Number of spins/bets left |
data.freeGames.games.bet | int | Bet amount |
data.freeGames.games.lines | int | Number of lines |
Example
{
"api": "balance",
"data": {
"userNick": "t*****[email protected]",
"amount": 10000,
"denomination": 8,
"currency": "BTC",
"userId": "4699292b-770f-4710-9496-ed9493aa0a6b123123",
"jpKey": "471513cc-99c0-446e-a5cc-8e94aaf4d639",
"freeGames": [
{
"bonusId": "887a1caa-e3d7-444e-99a3-d308040f2659",
"games": [
{
"id": "ib_al",
"initial": 20,
"left": 20,
"bet": 700,
"lines": 9
}
]
}
]
}
}
Operating With Free Games
After receiving information about available free games, provider is able to provide debit operations on free games. Read debit for further information.
Providing meta data
When all free games in bound of one bonus are processed, provider has to inform platform about end of free games. Read metadata for further information.
| Name | Type | Description |
|---|---|---|
api | string | Name of operation, “metaData” here |
data | object | |
data.gameSession | string | Game session id. |
data.currency | string | Balance currency. Passed by the link to open the game. See section “Managing Games and Connections”, field accounts[].gameEmbedUrl. |
data.gameId | string | [Optional field] Game id is required for the providers who are using specific session mode. (F.E. Lobby Games) |
data.api | string | Name of “metaData” operation. “freespinEnd” in this case available |
data.data.bonusId | string | Bonus id which must be reported as played |
data.data.total | int | Total amount of win for reported bonusId |
Example
Request:
curl --location --request POST 'https://apiEndpoint/open-api-games/v1/games-processor' \
--header 'Content-Type: application/json' \
--data '{
"api": "metaData",
"data": {
"gameSessionId": "16e2ea64-5725-40a4-99cc-c5c0deb8568d",
"currency": "RUB",
"api":"freespinEnd",
"data":{
"bonusId":"1234",
"total" : 1000
}
}'