Trueplay
Search…
🤝
Developer Portal | Trueplay
Operator integration - API • Reporting integration • Proxy integration • Widget integration • Create/update/get user • Trueplay/operator parameters.

🔵
Operator integration - API

Components diagram

Proxy integration

Operators should direct all traffic from game providers via Trueplay proxy.
Endpoint for game providers to send traffic to is https://{operator-name}.proxy.true-play.io
Trueplay proxy will pass all traffic from game providers to the operator endpoint.
An operator should push user game session information after the session started before any transactions happen using Push-game-session.

Widget integration

Operators should get Widget URL by Get-widget-URL and embed Widget via iframe in Operator portal.

Trueplay endpoints

Push game session

METHOD
POST
BODY
{
"operatorUserId": "john12345", "externalGameSessionId": "abc1234", "gameProvider": "Boongo",
"currency": "USD",
"gameName": "Fruit Nonja",
"gameType": "LIVE_LOTTERY"
}
HEADERS
X-API-KEY:143c387-30c6-43f8-b0c2-49f593c31e23 Content-Type: application/json
DETAILS
X-API-KEY - Operator key issued by TruePlay to access TruePlay API

Get widget URL

METHOD
GET
HEADERS
X-API-KEY:195c3567-30c6-43f8-b0c6-55f675c21e83
RESPONSE
{
"url": "https://widget.true-play.io?token=eyJhbGciOiJIUzUxMiJ9.eyJpZF9vcGVyYXRvciI6MSwiaWRfdXNlciI6NzUxMSwicm9sZSI6IlJPTEVfVVNFUiIsImV4cCI6MTYzNDY0NjA5Mn0.umIbsJCJAQmATaVj50nS1uFAhWpLLf3Ztq953aomIS7Vl5Es-BlHuKdof_CYGBcAsimR3q1K1_3LmDZXB8iC8w”
}
DETAILS
operatorUserId - ID of user in Operator
X-API-KEY - Operator key issued by TruePlay to access TruePlay API

Operator endpoints

Get User Balance

METHOD
POST
HEADERS
X-REQUEST-SIGNATURE:SIccPXmsq6XdaCd9t82ghl1bny54yVnwpjXNo0t0vLkPgtkUIQtt+1OoXp8FQfak0JyjK6FhayLHrO6RPAIIDg==
BODY
{
"operatorId": 1,
"operatorUserId": "user1"
}
RESPONSE
{
"balance": 0,
"currency": "string"
}
DETAILS

Token Exchange

METHOD
POST
HEADERS
X-REQUEST-SIGNATURE:SIccPXmsq6XdaCd9t82ghl1bny54yVnwpjXNo0t0vLkPgtkUIQtt+1OoXp8FQfak0JyjK6FhayLHrO6RPAIIDg==
BODY
{
"action": CREDIT | DEBIT,
"amount": 3.56,
"currency": "USD",
"exchangeRate": 5.31,
"tokenAmount": 18.9036,
"operatorId": 1,
"operatorUserId": "user1"
}
RESPONSE
{
"balance": 0,
"currency": "string"
}
DETAILS
operatorUserId - ID of user in Operator
operatorId - ID of Operator
X-REQUEST-SIGNATURE - Request signature, Base64(HmacSHA512(SecretKey, MD5(request body)))
CREDIT - Transfer from token balance to operator account balance
DEBIT - Transfer operator account balance to token balance

Trueplay parameters

Proxy URL: https://{operator-name}.proxy.true-play.io
Integration URL: https://integration.true-play.io
Secret(example): Qi3h+ET-6XaWA$3}B/Q:[email protected]'
Provide admin account with credentials

Operator parameters

Operator URL (example):
Base: https://integration.operator.com/api Paths per game provider: - GAME_PROVIDER_CODE: /game-provider-path - BOOONGO: /booongo - HUB88: /hub88

🔵
Create user

METHOD
POST
BODY
{ "operatorUserId": "john12345", "partnerId": 1 | null }
HEADERS
X-API-KEY:143c4562-20c9-43f8-b0c8-3576f685c31e23 Content-Type: application/json
DETAILS
X-API-KEY - Operator key issued by TruePlay to access TruePlay API

🔵
Update user

METHOD
PUT
BODY
{ "operatorUserId": "john12335", "test": true | false |null }
HEADERS
X-API-KEY:143c5767-30c6-24f8-b0c6-48f698c31e93 Content-Type: application/json
DETAILS
X-API-KEY - Operator key issued by TruePlay to access TruePlay API

🔵
Get user

METHOD
GET
URL
https://integration.true-play.io/api/v1/user/{operatorUserId}
BODY
{ "operatorUserId": "john12345", "partnerId": 1 | null, "test": false | null, "balance": 0.0001 }
HEADERS
X-API-KEY:143c5076-30c6-43f8-b0c6-48f687c31e93 Content-Type: application/json
DETAILS
X-API-KEY - Operator key issued by TruePlay to access TruePlay API

🔵
Reporting integration

Proxy only accepts traffic from an operator.
This endpoint should be implemented when the operator does not direct all traffic from game providers via TruePlay proxy. In that case, the operator should send game transactions to TruePlay proxy by himself.
METHOD
POST
URL
https://{operator-name}.proxy.true-play.io/api/v1/accept
BODY
{ "type": "BET | WIN | ROLLBACK", "gameSessionId": "gs1", "amount": 1.000000009, "transactionId": "tx2", "referenceTransactionId": "tx1" | null }
HEADERS
X-API-KEY:154c5598-30c6-75f8-b0c6-48f690c31e23 Content-Type: application/json
DETAILS
X-API-KEY - Operator key issued by TruePlay to access TruePlay API

🔵
Proxy integration

Operators should route all traffic from game providers through the Trueplay proxy.
The endpoint to which game providers send traffic is https://{operatorname}.proxy.true-play.io.
Trueplay proxy will pass all traffic from game providers to the operator endpoint.
An operator should push user game session information after the session started and before any transactions happen using 👇
Push game session
METHOD
POST
URL
https://integration.true-play.io/api/v1/game-session
BODY
{ "operatorUserId": "john12345", "externalGameSessionId": "abc1234", "gameProvider": "Boongo", "currency": "USD", "gameName": "Fruit Nonja", "gameType": "LIVE_LOTTERY" }
HEADERS
X-API-KEY:143c5877-30c6-93f8-b0c6-48f435c01e93 Content-Type: application/json
DETAILS
X-API-KEY - Operator key issued by Trueplay to access Trueplay API

🔵
Errors

We use standard HTTP codes. An error message will be returned in the response body.
400 Bad Request
Invalid request parameters provided
401 Unauthorized
Requester is unauthorized to perform an action
403 Forbidden
Requester is forbidden to perform an action
404 Not Found
Resource not found
Copy link
On this page
Operator integration - API
Components diagram
Proxy integration
Widget integration
Trueplay endpoints
Push game session
Get widget URL
Operator endpoints
Get User Balance
Token Exchange
Trueplay parameters
Operator parameters
Create user
Update user
Get user
Reporting integration
Proxy integration
Errors