Overview
Eva Casino Platform(or Eva) - PM casino platform.
Game Provider - 3rd party company provider who integrates their products to Integration Hub.
Integration Hub - integration point for all external integrations. Functionality/contracts are described later in this doc.
1. Integration Process
In order to integrate to Eva Casino Platform via integration hub - game provider should provide next information. Any communication channel is ok but email is preferred.
TODO: add RFI
2. Game Launch
Virtual sports games on frontend lobby are embedded either to iframe(for desktop browsing players) or via redirect to a game provider url with lobbyUrl parameter passed as a url where player should be redirected after a game session.
Game can be launched on Eva’s platform side based on game launch url template provided by provider.
Game provider should provide a way to launch individual product by identifier in a format described below.
Template should be 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 |
cid |
casino product id |
string(255) |
casino product identifier. issued by Eva Platform. can be the same on stage and prod environment. unique per operator |
productId |
game product id |
string(255) |
exact product id to be launched. this id is defined on game provider side |
sessionToken |
player session token |
string(255) |
session token which identifies unique player id on Eva Platform side. Generated by Eva Platform(before game launch redirect to game provider) |
lang |
language code |
string(2) |
language code in ISO 639-1 format |
Example of final game launch url:
https://coolvirtualproduct.com/launch?cid=parimatch&productId=horseRacing&sessionToken=abcd1234&lang=en&lobbyUrl=https%3A%2F%2Fm.casino.com%2Flobby
TODO: add image with game launch flow diagram
3. Wallet Integration (Virtual Sports)
Once the game is launched - game provider should produce wallet requests in order to:
-
render player’s balance and currency in game client
-
placing/settling/cancelling bets
-
notify wallet that match was closed and no more placing/settlements of bets are expected
In order to achieve this Eva Platform exposes Wallet API for virtual sports providers.
Wallet controller consists of all methods required to process player’s bets.
Wallet communication is available as application/json REST API.
Wallet API endpoint is exposed on Eva Platform side. It' different for staging and production environments.
Note
|
wallet endpoint url example: https://scr.eva-pm7games.com/wallet |
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 5 methods available:
-
/playerInfo
-
/placeBet
-
/settleBet
-
/cancelBet
-
/cancelSettlement
-
/closeMatch
All requests have common format which is extended based on the method called:
POST /wallet/<api_method_name> HTTP/1.1 Content-Type: application/json { "cid": "<string>", // other parameters }
3.1. /playerInfo
This method should be called in order to get player details(including balance) by sessionToken passed to game client.
3.1.1. Request Example
POST /eva/hub/vs/wallet/playerInfo HTTP/1.1
Host: scr-vs.eva-pm7games.com
Content-Type: application/json
Content-Length: 58
{"cid": "parimatch", "sessionToken":"valid-session-token"}
Note
|
You should not explicitly set Host header. It will be set by integration hub |
Property Name |
Description |
Type |
Notes |
cid |
casino identifier |
string(255) |
value passed upon game launch as query parameter |
sessionToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
3.1.2. Response Example
{"country":"UA","balance":10000,"currency":"UAH","playerId":"john"}
Property Name |
Description |
Type |
Notes |
playerId |
unique player identifier |
string(255) |
unique per casino(cid) |
balance |
player’s balance |
integer |
balance in minor units. mostly in cents |
currency |
player’s currency |
string(3) |
ISO-4217-3 format |
country |
player’s country |
string(2) |
ISO-3166-1 alpha-2 format |
3.2. /placeBet
Once player details received and game client rendered - game engine can call placeBet in order to commit player bet wallet transaction.
POST /eva/hub/vs/wallet/placeBet HTTP/1.1
Host: scr-vs.eva-pm7games.com
Content-Type: application/json
Content-Length: 175
{"cid": "parimatch", "sessionToken":"valid-session-token", "playerId":"john", "productId":"cool-vs-game", "matchId":"match-id-1", "txId":"42", "amount":1000, "currency":"EUR"}
Note
|
You should not explicitly set Host header. It will be set by integration hub |
Property Name |
Description |
Type |
Notes |
cid |
casino identifier |
string(255) |
value passed upon game launch as query parameter |
sessionToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
playerId |
player’s identifier |
string(255) |
unique player’s identifier(received from platform on /info call) |
productId |
product identifier on game provider side |
string(255) |
product id where bet was placed(same as was passed during product launch) |
txId |
game transaction id |
string(255) |
unique transaction id on game provider’s side |
matchId |
match id(game round equivalent for instant games) |
string(255) |
match/round id on game provider’s side |
amount |
transaction amount to process |
integer |
amount of transaction in currency’s minor units |
currency |
currency of transaction |
string(3) |
currency of transaction |
3.2.1. Response Example
{"createdAt":"2020-12-03T12:15:30.000+0200","balance":9000,"txId":"42","processedTxId":"eva-tx-1","alreadyProcessed":false}
Property Name |
Description |
Type |
Notes |
txId |
game provider’s transaction id |
string(255) |
same as passed to request |
processedTxId |
committed transaction id on Eva Platform side |
string(255) |
transaction id on Eva Platform side |
createdAt |
transaction created time |
timestamp |
format: yyyy-MM-dd’T’HH:mm:ss.SSSZ |
balance |
player’s remaining balance |
integer |
in minor units(mostly cents) |
alreadyProcessed |
idempotence layer hit status |
boolean |
flag which identifies if transaction was already processed before this call |
3.3. /settleBet
When there is a game result and player won game provider can call settleBet in order to commit win wallet transaction.
POST /eva/hub/vs/wallet/settleBet HTTP/1.1
Host: scr-vs.eva-pm7games.com
Content-Type: application/json
Content-Length: 175
{"cid": "parimatch", "sessionToken":"valid-session-token", "playerId":"john", "productId":"cool-vs-game", "matchId":"match-id-1", "txId":"43", "amount":2000, "currency":"EUR"}
Note
|
You should not explicitly set Host header. It will be set by integration hub |
Property Name |
Description |
Type |
Notes |
cid |
casino identifier |
string(255) |
value passed upon game launch as query parameter |
sessionToken |
player’s session token |
string(255) |
value passed upon game launch as query parameter |
playerId |
player’s identifier |
string(255) |
unique player’s identifier(received from platform on /info call) |
productId |
product identifier on game provider side |
string(255) |
product id where bet was placed(same as was passed during product launch) |
txId |
game transaction id |
string(255) |
unique transaction id on game provider’s side |
matchId |
match id(game round equivalent for instant games) |
string(255) |
match/round id on game provider’s side |
amount |
transaction amount to process |
integer |
amount of transaction in currency’s minor units |
currency |
currency of transaction |
string(3) |
currency of transaction |
3.3.1. Response Example
{"createdAt":"2020-12-03T12:15:30.000+0200","balance":11000,"txId":"43","processedTxId":"eva-tx-2","alreadyProcessed":false}
Property Name |
Description |
Type |
Notes |
txId |
game provider’s transaction id |
string(255) |
same as passed to request |
processedTxId |
committed transaction id on Eva Platform side |
string(255) |
transaction id on Eva Platform side |
createdAt |
transaction created time |
timestamp |
format: yyyy-MM-dd’T’HH:mm:ss.SSSZ |
balance |
player’s remaining balance |
integer |
in minor units(mostly cents) |
alreadyProcessed |
idempotence layer hit status |
boolean |
flag which identifies if transaction was already processed before this call |
3.4. /closeMatch
Once the virtual match is over - game provider should call closeMatch in order to end logical game round on Eva Platform’s side. We don’t expect any placeBet/settleBet calls within closed match.
POST /eva/hub/vs/wallet/closeMatch HTTP/1.1
Host: scr-vs.eva-pm7games.com
Content-Type: application/json
Content-Length: 91
{"cid": "parimatch", "playerId":"john", "productId":"cool-vs-game", "matchId":"match-id-1"}
Property Name |
Description |
Type |
Notes |
cid |
casino identifier |
string(255) |
value passed upon game launch as query parameter |
playerId |
player’s identifier |
string(255) |
unique player’s identifier(received from platform on /info call) |
productId |
product identifier on game provider side |
string(255) |
product id where bet was placed(same as was passed during product launch) |
matchId |
match id(game round equivalent for instant games) |
string(255) |
match id to close |
3.4.1. Response Example
{"matchId":"match-id-1","alreadyProcessed":false}
Property Name |
Description |
Type |
Notes |
matchId |
match id that was closed |
string(255) |
same as in request |
alreadyProcessed |
idempotence layer hit status |
boolean |
flag which identifies if equivalent request was already processed before this call |