Game Provider - PopOk Gaming provider that provides an API to Casino platforms
Platform - integration point for all external integrations. Functionality/contracts are described later in this doc.
1. Game Launch
1.1. Get Launcher URL
Retrieve an up-to-date game launch URL (handles geo-blocks/rotating hosts).
1.1.1. Request Example
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
{
"action": "getLauncherURL",
"platform": 8,
"partnerId": 1,
"time": "29-08-2026 11:47:24",
"hash": "dd9f710d5d324f66b7429052fa97debf8347e579471ab059a27d503010a31e2a",
"data": {
"gameMode": "real",
"gameId": "1",
"lang": "en",
"externalToken": "80bfefc4344e78f7dc13745c0efe5",
"playerId":"operators player id",
"country":"GB",
"ip":"users ip address"
"exitURL": ""
}
}
Hash string is calculated based on privateKey, time, and "data" in JSON string.
$hash = hash("sha256", $privateKey . $time . json_encode(data, JSON_UNESCAPED_SLASHES));
$privateKey = "utj3Gfrr0W "; // provided Private Key
$time = "29-08-2026 11:47:24";
$dataEncoded = '{"gameMode":"real","gameId":"1","lang":"en","token":"80bfefc4344e78f7dc13745c0efe5","exitURL":""}';
$hash = hash("sha256", 'utj3Gfrr0W29-08-2026 11:47:24{"gameMode":"real","gameId":"1","lang":"en","token":"80bfefc4344e78f7dc13745c0efe5","exitURL":""}');
// "d8ac5ca5c416c1aeadca11013e6dbaa613248739d7c1ad19e6f7601d57d4699f"
1.1.2. Response Example
{
"code": 0,
"message": "ok",
"data": {
"launcherURL": "https://st.pokgaming.com/?partnerId=1&gameId=1&gameMode=real&lang=en&platform=8&externalToken=80bfefc4344e78f7dc13745c0efe5&exitURL="
}
}
1.2. Details
Launched games can be embedded either to iframe (for desktop browsing players) or via direct game provider url with referalUrl parameter passed as a url where player should be redirected after a game session.
Game can be launched on platform side based on game launch url template provided by provider.
Game provider provides a way to launch individual product by identifier in a format described below.
Template are of form:
https://<game_provider_base_url>?<query_parameters>
where:
-
game_provider_base_url - is a base url where game launch controller is hosted
-
query_parameters - is a set of query parameters needed for a specific product to launch
Parameter Name | Description | Type | Notes |
---|---|---|---|
partnerId |
platform partner id |
number |
partner id issued by Platform. can be the same on stage and prod environment |
gameId |
game id |
number |
exact game id to be launched (game identifier). defined on game provider side |
gameMode |
Game launch mode |
string |
Game launch mode expected values are fun or real |
lang |
language code |
string(2) |
language code in ISO 639-1 format |
country |
country code |
string(2) |
country code code in ISO 3166-1 alpha-2 format |
playerId |
Player Identifier |
string |
unique per platform, the same playerId value which is retrieved from playerInfo method |
ip |
ip address |
string |
player's ip address |
platform |
platform indetifier |
number |
platform provided by provider side |
externalToken |
player session token |
string(255) |
session token which identifies unique player token on Platform side. generated by Platform. not present when launching game in Demo mode |
Example of final game launch url:
https://st.pokgaming.com/?partnerId=1&gameId=2&gameMode=real&lang=en&platform=1&externalToken=80bfefc4344e78f7dc13745c0efe5
1.3. Demo mode
Demo mode game launch URL generated by Platform has the same set of parameters as for a regular game launch except for 'externalToken'.
Example of Demo mode game launch url:
https://st.pokgaming.com/?partnerId=1&gameId=2&gameMode=fun&lang=en&platform=1
2. Games Integration
Once the game is launched - game provider will produce requests in order to:
-
render player’s balance and currency in game client
-
placing/settling/cancelling bets
In order to achieve this PopOk provider exposes API for platforms.
The controller consists of all methods required to process player’s bets.
The communication is available as application/json REST API.
The API endpoint is exposed on PopOk provider side. It’s the same for staging and production environments.
The API requests will contain 'externalToken' get parameter which identifies platform’s integration on Game Provider side. External Token value is passed in game launch URL as 'externalToken'. It is the same for staging and production environments.
Important
|
we support only HTTPS communication. All API requests should be POST calls to respective path with Content-Type: application/json posted as body |
There are total of 6 methods available:
-
/playerInfo
-
/bet
-
/win
-
/cancel
-
/tournamentWin
-
/promoWin
All requests have common format which is extended based on the method called:
POST /<api_method_name> HTTP/1.1 Content-Type: application/json { parameters }
2.1. /playerInfo
This method should be called in order to get player details(including balance) by externalToken passed to game client.
2.1.1. Request Example
POST /playerInfo HTTP/1.1
Content-Type: application/json
{"externalToken":"valid-session-token"}
Property Name | Description | Type | Notes |
---|---|---|---|
externalToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
2.1.2. Response Example
{"country":"UK","currency":"EUR","balance":10000,"playerId":"abc123"}
Property Name | Description | Type | Notes |
---|---|---|---|
playerId |
unique player identifier |
string(100) |
unique per platform |
balance |
player’s balance |
decimal |
balance in decimal number |
currency |
player’s currency |
string(3) |
ISO-4217-3 format |
country |
player’s country |
string(2) |
ISO-3166-1 alpha-2 format |
2.2. /bet
Once player details received and game client rendered - game engine can call /bet in order to commit player bet transaction.
POST /bet HTTP/1.1
Content-Type: application/json
{"externalToken":"valid-session-token","playerId":"abc123456, "gameId":"123", "transactionId":"124677", "amount":10, "currency":"EUR"}
Property Name | Description | Type | Notes |
---|---|---|---|
externalToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
playerId |
unique player identifier |
string(100) |
unique per platform |
gameId |
game identifier on game provider side |
string(255) |
game id where bet was placed(same as was passed during product launch) |
transactionId |
game transaction id |
string(255) |
unique transaction id on game provider’s side |
amount |
transaction amount to process |
decimal |
amount of transaction in currency |
currency |
currency of transaction |
string(3) |
currency of transaction |
2.2.1. Response Example
{"transactionId":"abc123","externalTrxId":"abc123","balance":9000}
Property Name | Description | Type | Notes |
---|---|---|---|
transactionId |
game provider’s transaction id |
string(255) |
same as passed to request |
externalTrxId |
committed transaction id on Platform side |
string(255) |
transaction id on Platform side |
balance |
player’s remaining balance |
number |
in minor units(mostly cents) |
2.3. /win
When there is a game result provider will call /win in order to commit win transaction.
POST /win HTTP/1.1
Content-Type: application/json
{"externalToken":"valid-session-token","playerId":"abc123456, "gameId":"123", "transactionId":"124677", "amount":10, "currency":"EUR"}
Important
|
Normally we expect every round to be finalized with win transaction. So in case game round is finished and result is failed, Provider will request again to commit the transaction in order to close the round. |
Property Name | Description | Type | Notes |
---|---|---|---|
externalToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
playerId |
unique player identifier |
string(100) |
unique per platform |
gameId |
game identifier on game provider side |
string(255) |
game id where bet was placed(same as was passed during product launch) |
transactionId |
game transaction id |
string(255) |
unique transaction id on game provider’s side |
amount |
transaction amount to process |
decimal |
amount of transaction in currency |
currency |
currency of transaction |
string(3) |
currency of transaction |
2.3.1. Response Example
{"transactionId":"abc123","externalTrxId":"abc123","balance":9000}
Property Name | Description | Type | Notes |
---|---|---|---|
balance |
player’s remaining balance |
number |
in minor units(mostly cents) |
transactionId |
game provider’s transaction id |
string(255) |
same as passed to request |
externalTrxId |
committed transaction id on Platform side |
string(255) |
transaction id on Platform side |
2.4. /cancel
For revoking bet transaction call /cancel.
POST /cancel HTTP/1.1
Content-Type: application/json
{"externalToken":"valid-session-token", "playerId":"abc123", "gameId":"abc123", "transactionId":"abc123"}
Property Name | Description | Type | Notes |
---|---|---|---|
externalToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
playerId |
player’s identifier |
string(100) |
unique player’s identifier(received from platform on /info call) |
gameId |
game identifier on game provider side |
string(255) |
game id where bet was placed(same as was passed during product launch) |
transactionId |
game provider’s transaction id |
string(255) |
same as passed to request |
2.4.1. Response Example
{"transactionId":"abc123","externalTrxId":"abc123","balance":9000}
Property Name | Description | Type | Notes |
---|---|---|---|
balance |
player’s remaining balance |
decimal |
balance in decimal number |
transactionId |
game provider’s transaction id |
string(255) |
same as passed to request |
externalTrxId |
committed transaction id on Platform side |
string(255) |
transaction id on Platform side |
2.5. /tournamentWin
When player gains a tournament win, game provider can call /tournamentWin in order to commit corresponding win transaction.
POST /tournamentWin HTTP/1.1
Content-Type: application/json
{"externalToken":"valid-session-token","playerId":"abc123456, "gameId":"123", "transactionId":"124677", "amount":10, "currency":"EUR"}
Property Name | Description | Type | Notes |
---|---|---|---|
externalToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
playerId |
unique player identifier |
string(100) |
unique per platform |
gameId |
game identifier on game provider side |
string(255) |
game id where bet was placed(same as was passed during product launch) |
transactionId |
game transaction id |
string(255) |
unique transaction id on game provider’s side |
amount |
transaction amount to process |
number |
amount of transaction in currency’s minor units |
currency |
currency of transaction |
string(3) |
currency of transaction |
2.5.1. Response Example
{"transactionId":"abc123","externalTrxId":"abc123","balance":9000}
Property Name | Description | Type | Notes |
---|---|---|---|
balance |
player’s remaining balance |
number |
in minor units(mostly cents) |
transactionId |
game provider’s transaction id |
string(255) |
same as passed to request |
externalTrxId |
committed transaction id on Platform side |
string(255) |
transaction id on Platform side |
2.6. /promoWin
When the provider needs to grant a player with promo wins, there is a /promoWin call available to commit such transactions.
POST /promoWin HTTP/1.1
Content-Type: application/json
{
"externalToken":"valid-session-token",
"playerId":"abc123456",
"gameId":"123",
"transactionId":"124677",
"externalReferenceId":"provided externalReferenceId",
"amount":10,
"currency":"EUR"
}
Property Name | Description | Type | Notes |
---|---|---|---|
externalToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
playerId |
unique player identifier |
string(100) |
unique per platform |
gameId |
game identifier on game provider side |
string(255) |
game id where bet was placed(same as was passed during product launch) |
transactionId |
game transaction id |
string(255) |
unique transaction id on game provider’s side |
amount |
transaction amount to process |
number |
amount of transaction in currency’s minor units |
externalReferenceId |
externalReferenceId passed when giving a player free rounds |
string(100) |
is optional, available only when requesting to settle for free rounds winning |
currency |
currency of transaction |
string(3) |
currency of transaction |
2.6.1. Response Example
{"transactionId":"abc123","externalTrxId":"abc123","balance":9000}
Property Name | Description | Type | Notes |
---|---|---|---|
balance |
player’s remaining balance |
number |
in minor units(mostly cents) |
transactionId |
game provider’s transaction id |
string(255) |
same as passed to request |
externalTrxId |
committed transaction id on Platform side |
string(255) |
transaction id on Platform side |
2.7. /generateNewToken
When the provider needs to change the game through the lobby, there is a /generateNewToken call available to get new token for openning that game.
POST /generateNewToken HTTP/1.1
Content-Type: application/json
{"token":"valid-session-token", "newGameId":"123"}
Property Name | Description | Type | Notes |
---|---|---|---|
token |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
newGameId |
game's identifier from provider side |
string(255) |
new game id which player wants to launch |
2.7.1. Response Example
{"newToken":"new-valid-session-token"}
Property Name | Description | Type | Notes |
---|---|---|---|
newToken |
new token to launch the game |
string(255) |
value to pass for open the game |
3. Error Handling
In case of errors platform should respond with json containing details on error.
Error response example
{"code":"invalid.externalToken","message":"External token is invalid or expired"}
Property Name | Description | Type | Notes |
---|---|---|---|
code |
error code identifier |
string |
you can find important error codes list in sections below |
message |
human readable error message |
text |
3.1. Error codes
Below you can find a list of important error codes that can be returned in error response
Code | Message | Description | Notes |
---|---|---|---|
invalid.externalToken |
External token is invalid or expired |
returned when session token passed in request is expired or wrong |
can happen only in playerInfo/placeBet/bet calls |
insufficient.balance |
Insufficient player balance |
returned when there is not enough balance to perform an action |
can happen only in bet |
transaction.already.exists |
Douplicate transaction |
returned when the transaction already exists |
can happen in bet or win |
transaction.already.cancelled |
Already cancelled |
returned when the transaction already has been cancelled |
can happen in bet or win |
invalid.transaction.id |
Unexpected transaction id |
returned for unknown transaction |
|
failure |
message:must not be blank |
returned for any other failures that are not listed above |
4. Extra Calls
4.1 Free Rounds
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
{
"action": "freeRounds",
"platform": 8,
"partnerId": 1,
"time": "24-03-2021 11:03:04",
"data": {
"playerId": "24429392",
"externalReferenceId": "41d5-ae4a-48a83e6321a0",
"freeRoundValidity": "13-04-2021 11:04:04",
"numberOfFreeRounds": 40,
"betLevel": 0,
"gameIds": ["2","28"]
},
"hash": "36435dd6e55d8926e2b97c4ae7450bee"
}
Property Name | Description | Type | Notes |
---|---|---|---|
action |
request type |
string |
|
platform |
platform identifier |
integer |
unique per platform |
partnerId |
identifier of partner on the platform |
integer |
|
time |
request time |
string |
dd-mm-yyyy hh:mm:ss |
data[playerId] |
unique player identifier |
string(100) |
unique per platform |
data[externalReferenceId] |
unique free round reference identifier |
string(100) |
unique per platform |
data[freeRoundValidity] |
free round expire date |
string |
dd-mm-yyyy hh:mm:ss |
data[numberOfFreeRounds] |
number of free rounds |
integer |
|
data[betLevel] |
level of bet |
integer |
index of bet in the bet's array |
data[gameIds] |
list of game identifiers |
array |
only first launched game gets free rounds |
hash |
calculated sha256 string (privateKey provided game provider’s side) |
string |
hash string is calculated based on privateKey, time, and "data" in JSON string. Example $hash = hash("sha256", "privateKey15-02-2023 15:31:31json_encode(data) |
4.1.1 Response Example
{
"code": 0,
"message": "ok",
"data": {
"referenceId": "41d5-ae4a-48a83e6321a0"
}
}
4.2 Free Rounds by Bet Amount for a single slot game
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
{
"action": "freeRounds",
"platform": 8,
"partnerId": 1,
"time": "24-03-2021 11:03:04",
"data": {
"playerId": "24429392",
"externalReferenceId": "41d5-ae4a-48a83e6321a0",
"freeRoundValidity": "13-04-2021 11:04:04",
"numberOfFreeRounds": 40,
"amount": 0.1,
"currency":"EUR",
"gameIds": ["2"]
},
"hash": "36435dd6e55d8926e2b97c4ae7450bee"
}
Property Name | Description | Type | Notes |
---|---|---|---|
action |
request type |
string |
|
platform |
platform identifier |
integer |
unique per platform |
partnerId |
identifier of partner on the platform |
integer |
|
time |
request time |
string |
dd-mm-yyyy hh:mm:ss |
data[playerId] |
unique player identifier |
string(100) |
unique per platform |
data[externalReferenceId] |
unique free round reference identifier |
string(100) |
unique per platform |
data[freeRoundValidity] |
free round expire date |
string |
dd-mm-yyyy hh:mm:ss |
data[numberOfFreeRounds] |
number of free rounds |
integer |
|
data[currency] |
currency of bet amount |
string(3) |
currency of bet amount for all free rounds |
data[amount] |
the bet amount in the provided currency |
number |
the amount that is taken from game list response bets list |
data[gameIds] |
list of game identifiers |
list of games, must be length of 1 game |
only first launched game gets free rounds |
hash |
calculated sha256 string (privateKey provided game provider’s side) |
string |
hash string is calculated based on privateKey, time, and "data" in JSON string. Example $hash = hash("sha256", "privateKey15-02-2023 15:31:31json_encode(data) |
4.2.1 Response Example
{
"code": 0,
"message": "ok",
"data": {
"referenceId": "41d5-ae4a-48a83e6321a0"
}
}
4.3 Round Info
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
{
"action": "getGameRound",
"platform": 8,
"partnerId": 1,
"time": "24-03-2021 11:03:04",
"data": {
"roundId": 27731,
"logMonth": 0
},
"hash": "36435dd6e55d8926e2b97c4ae7450bee"
}
Property Name | Description | Type | Notes |
---|---|---|---|
action |
request type |
string |
|
platform |
platform identifier |
integer |
unique per platform |
partnerId |
identifier of partner on the platform |
number |
|
time |
request time |
string |
dd-mm-yyyy hh:mm:ss |
data[roundId] |
bet transaction id |
bigint |
transaction id is provided from game provider side |
data[logMonth] |
month passed from current month |
integer |
|
hash |
calculated sha256 string (privateKey provided game provider’s side) |
string |
hash string is calculated based on privateKey, time, and "data" in JSON string. Example $hash = hash("sha256", "privateKey15-02-2023 15:31:31json_encode(data) |
4.3.1 Response Example
{
"code": 0,
"message": "ok",
"data": [
{
"id": 4510,
"gameId": 46,
"action": "spin",
"bet": 100,
"win": 10,
"currencyName": "AMD",
"roundId": 27731,
"actionTime": "2022-10-17 14:22:27",
"source": 1,
"url": "round info link"
}
]
}
4.4 Round Replay Info
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
{
"action": "roundReplayInfo",
"platform": 8,
"partnerId": 1,
"time": "2025-07-11 16:14:22",
"data": {
"roundId": 14134636304,
"logMonth": 7
},
"hash": "1975d555527d2004b6956321a0e0e6f4635f7d32f53cf2be332ec2852fa6e4bb"
}
Property Name | Description | Type | Notes |
---|---|---|---|
action |
request type |
string |
|
platform |
platform identifier |
integer |
unique per platform |
partnerId |
identifier of partner on the platform |
integer |
|
time |
request time |
string |
dd-mm-yyyy hh:mm:ss |
data[roundId] |
round transaction id |
bigint |
transaction id is provided from game provider side |
data[logMonth] |
month passed from current month |
integer |
|
hash |
calculated sha256 string (privateKey provided game provider’s side) |
string |
hash string is calculated based on privateKey, time, and "data" in JSON string. Example $hash = hash("sha256", "privateKey15-02-2023 15:31:31json_encode(data) |
4.4.1. Response Example
{
"code": 0,
"message": "ok",
"data": {
"start": "2025-07-11 12:13:47",
"end": "2025-07-11 16:14:22",
"betAmount": 20,
"winAmount": 4.9,
"currency": "EUR",
"replayLink": "https://st.pokgaming.com/replayGame.php?replayToken=220087fe30416c&tableM=0&lang=en"
}
}
4.5 Game List
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
{
"action": "gameList",
"platform": 8,
"partnerId": 1,
"currency": "USD",
"time": "24-03-2021 11:03:04",
"hash": "36435dd6e55d8926e2b97c4ae7450bee"
}
$privateKey = "providedPrivateKey";
$time = "24-03-2021 11:03:04";
$hash = hash("sha256", $providedPrivateKey.$time) //30daffef135c89b238695e2c7a6cf5a2e5f440787c51895d0feb1d84cdacf193
Property Name | Description | Type | Notes |
---|---|---|---|
action |
request type |
string |
|
platform |
platform identifier |
integer |
unique per platform |
currency |
bets are shown in passed parameter |
string |
example USD,EUR,BYN |
partnerId |
identifier of partner on the platform |
integer |
|
time |
request time |
string |
dd-mm-yyyy hh:mm:ss |
hash |
calculated sha256 string (privateKey provided game provider’s side) |
string |
hash string is calculated based on privateKey, time, and "data" in JSON string. Example $hash = hash("sha256", "privateKey15-02-2023 15:31:31json_encode(data)"); |
4.5.1 Response Example
{
"code": 0,
"message": "ok",
"data": {
"slots": [
{
"id": 1,
"gameName": "Blazing Hot",
"bets": [0.02,0.04,0.06],
"thumbnail": "https://pokgaming.com/gameThumbnails/1.jpg",
"status": 1
},
{
"id": 2,
"gameName": "Diamond Flash",
"bets": [0.02,0.04,0.06],
"thumbnail": "https://pokgaming.com/gameThumbnails/2.jpg",
"status": 1
}
]
}
}
4.6 Cancel Free Rounds
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
{
"action": "cancelFreeRounds",
"platform": 8,
"partnerId": 1,
"data": {
"playerId": "24429392",
"externalReferenceId": "41d5-ae4a-48a83e6321a0"
},
"hash": "36435dd6e55d8926e2b97c4ae7450bee"
}
Property Name | Description | Type | Notes |
---|---|---|---|
action |
request type |
string |
|
platform |
platform identifier |
integer |
unique per platform |
data[playerId] |
unique player identifier |
string(100) |
unique per platform |
data[externalReferenceId] |
unique free round reference identifier |
string(100) |
unique per platform |
hash |
calculated sha256 string (privateKey provided game provider’s side) |
string |
hash string is calculated based on privateKey, time, and "data" in JSON string. Example $hash = hash("sha256", "privateKey15-02-2023 15:31:31json_encode(data)"); |
4.6.1 Response Example
{
"code": 0,
"message": "ok",
"data": {
"referenceId": "{refId}"
}
}
5 Currencies
5.1 Currency List
POST /serviceApi.php HTTP/1.1
Content-Type: application/json
{
"action": "currencyList",
"platform": 8,
"partnerId": 1,
"hash": "36435dd6e55d8926e2b97c4ae7450bee"
}
Property Name | Description | Type | Notes |
---|---|---|---|
action |
request type |
string |
|
platform |
platform identifier |
integer |
unique per platform |
partnerId |
identifier of partner on the platform |
integer |
|
hash |
calculated sha256 string (privateKey provided by the game provider’s side) |
string |
Hash string is calculated based on
|
5.1.1 Response Example
{
"code": 0,
"message": "ok",
"data": {
"currencies": [
{
"name": "USD",
"symbol": "$"
},
{
"name": "EUR",
"symbol": "€"
},
{
"name": "GBP",
"symbol": "£"
}
]
}