One-Gaming API Intergration Guide

version 1.4.1 by Eason Chow

Introduction

For the most security, our secure transactions use SHA256HMAC symmetric encryption method, and Operator will obtain the encryption key from 1G client service

Documentation contains SEAMLESS WALLET and TRANSFER WALLET modes .

Mobile Sources

Andriod :

http://interdownload.info/download/OneGaming.apk

Google Play Store :

https://play.google.com/store/apps/details?id=com.HippoTechnology.IGPoker

IOS App Store :

first install the Testflight app from the App Store

when it's finished installing.

please CLICK this LINK: https://testflight.apple.com/join/s2cJpqor

if an update occurs in the future ...,

please update directly via the testflight application that has been downloaded, -

open the testflight application and please update the ONEGAMING application.

The Signature

Before the integration, 1G Client Service will provided a secret_key are use to encrypt by SHA256 HMAC with concatenate request body as string.

Example :

  • Key Provided | secret_key varchar(50)

  • String to be Encrypt | var content varchar(50)

    agent_code = "IGBO" , player_id = "CLi3000001" , username = "Mikha"

    String to be Encrypt :

  • After Encrypted | bcode varchar(50)

    ** Be Careful alphabet capital letter will make encrypted code are different.

Sample 1 : (PHP)show

Sample 2 : (C#)show

Sample 3 : (JAVA)show

Lobby Request Validation

To prevend 3rd side lobby request , 1G Server will do a callback verification request to Operator.

The validation request is calling operator's url + /igPokerValidation with GET method which is

Sample

Operator have to return verify of parameter l_token is exists.

Glossary

At the bottom of this page is located glossary of terms and entities which we use in our system and documentation. If you have run into an unknown parameter or need more information about a parameter, please, refer to the glossary for the description, examples, and a list of possible values.

Returns the Landing HTML of lobby.


Parameters

Parameters Value
agent_code * required
string
player_id * required
string
l_token* required
string
Session token of player generated by operator ( available in UUID , GUID )
bcode* required
string

concatenate( agent_code + player_id + l_token )

Encrypted SHA256HMAC by content and secret_key
game_code
string
Game code

Responses

Status code Description
200 Example Value
                        

<html>

<game_lobby>

</html>

200 Example Value | Model
                        

{

"status_code" : "1",

"error_code" : "309",

"message" : "Invalid User Info."

}

Returns the url link of lobby. Operator has to forward User to returned URL. There are several ways to forward the User:

1. Embed URL into iframe on your site;

2. Redirect User to URL;

3. Open URL in new window/tab of browser.


Parameters

Parameters Value
agent_code * required
string
player_id * required
string
l_token* required
string
Session token of player generated by operator ( available in UUID , GUID )
bcode* required
string

concatenate( agent_code + player_id + l_token )

Encrypted SHA256HMAC by content and secret_key
game_code
string
Game code

Responses

Status code Description
200 Example Value | Model
                                

{

"status_code" : 0 ,

"message" : "Success" ,

"player_id" : "cli000001" ,

"currency" : "IDR",

"balance" : 27405267

"LobbyUrl" : "http://inter-gaming.com/lobby/CLi000001/XaQb8iJZa3cViYJNZmVsc7OX4iQcdlapuMQgZqKbi03Fvh0uTsu3FQGF4D5E"

}

200 Example Value | Model
                                

{

"status_code" : "1",

"error_code" : "309",

"message" : "Invalid User Info."

}

Returns the Landing Mobile version HTML of lobby.


Parameters

Parameters Value
agent_code * required
string
player_id * required
string
l_token* required
string
Session token of player generated by operator ( available in UUID , GUID )
bcode* required
string

concatenate( agent_code + player_id + l_token )

Encrypted SHA256HMAC by content and secret_key

Responses

Status code Description
200 Example Value
                        

<html>

<mobile_game_lobby>

</html>

200 Example Value | Model
                        

{

"status_code" : "1",

"error_code" : "309",

"message" : "Invalid User Info."

}

Returns the url link of mobile version lobby. Operator has to forward User to returned URL. There are several ways to forward the User:

1. Embed URL into iframe on your site;

2. Redirect User to URL;

3. Open URL in new window/tab of browser.


Parameters

Parameters Value
agent_code * required
string
player_id * required
string
l_token* required
string
Session token of player generated by operator ( available in UUID , GUID )
bcode* required
string

concatenate( agent_code + player_id + l_token )

Encrypted SHA256HMAC by content and secret_key

Responses

Status code Description
200 Example Value | Model
                                

{

"status_code" : 0 ,

"message" : "Success" ,

"player_id" : "cli000001" ,

"currency" : "IDR",

"balance" : 27405267

"LobbyUrl" : "http://inter-gaming.com/lobby_m/cli000001/XaQb8iJZa3cViYJNZmVsc7OX4iQcdlapuMQgZqKbi03Fvh0uTsu3FQGF4D5E"

}

200 Example Value | Model
                                

{

"status_code" : "1",

"error_code" : "309",

"message" : "Invalid User Info."

}

Shows the list of games that are available for the Operator


Parameters

Name Description
UG-Data-Signature * required
string
( header )
Encrypted signature
UG-Agent * required
string
( header )
The agent name are provided from Operator.
UG-Sub-Agent
string
( header )
The sub agent are registered under Operator .
Request Content * required
JSON
( body )
Example Value | Model
                        

{

"username" : "benjamin" ,

"token": "1a9c7a36-8b56-45c4-b50e-721838be4d6d",

"game_id": 301,

"platform": "desktop",

"lang": "en",

"currency": "BTC",

"country": "EE",

"ip": "142.245.172.168",

"datetime": "2020-01-15 18:13:23",

"lobby_url": "https://amazing-casino.com/lobby",

"deposit_url": "https://amazing-casion.com/deposit"

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"category" : "SLOT",

"provider" : "GamePlay",

"data": [{

"title" : "Nation - Double Play",

"image_url" : "http://aurinkokunta.net/image/demo_assets/gp_slots/nationdoubleplay.jpg",

"url" : "http://ug396-apis.orsg/gameplay/game_launch?game=slots&type=web&token=QAay9rvPlbCSAASCSCACAScKM4tD2aO

&demo=0&game_id=nationdoubleplay",

},{...}],

"datetime": "2020-01-17 12:23:14"

}

400 Example Value | Model
                        

{

"status" : "INVALID_SIGNATURE",

}

Create wallet.

Specifically for traditional wallet mode.

This feature will not be available if Operator chooses to use the seamless wallet mode.

To keeps player's info and credit balance on vendors side.


Parameters

Name Description
UG-Data-Signature * required
string
( header )
Encrypted signature
UG-Agent * required
string
( header )
The agent name are provided from Operator.
UG-Sub-Agent
string
( header )
The sub agent are registered under Operator .
Request Content * required
JSON
( body )
Example Value | Model
                        

{

"username" : "benjamin" ,

"currency" : "BTC",

"datetime" : "2020-01-15 18:13:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"datetime": "2020-01-17 12:23:14"

}

400 Example Value | Model
                        

{

"status" : "USER_EXIST",

}

Check user's credit balance .


Parameters

Name Description
UG-Data-Signature * required
string
( header )
Encrypted signature
UG-Agent * required
string
( header )
The agent name are provided from Operator.
UG-Sub-Agent
string
( header )
The sub agent are registered under Operator .
Request Content * required
JSON
( body )
Example Value | Model
                        

{

"username" : "benjamin" ,

"datetime" : "2020-01-15 18:13:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"balance" : 5000000.00 ,

"datetime": "2020-01-17 12:23:14"

}

400 Example Value | Model
                        

{

"status" : "USER_NOT_EXIST",

}

Deposit credit to user's wallet.


Parameters

Name Description
UG-Data-Signature * required
string
( header )
Encrypted signature
UG-Agent * required
string
( header )
The agent name are provided from Operator.
UG-Sub-Agent
string
( header )
The sub agent are registered under Operator .
Request Content * required
JSON
( body )
Example Value | Model
                        

{

"username" : "benjamin" ,

"ref_txn_id" : "4c4287ce-8427-4d1b-80fa-1bdc65217d6a" ,

"amount" : 50000.00 ,

"datetime" : "2020-01-15 18:13:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"balance" : 450000.00 ,

"txn_ticket" : "28af8044-3f64-46bc-a406-654534d06ec9" ,

"ref_txn_id" : "4c4287ce-8427-4d1b-80fa-1bdc65217d6a" ,

"datetime": "2020-01-17 12:23:14"

}

400 Example Value | Model
                        

{

"status" : "DUPLICATE_REF_TXN_ID",

}

Withdraw credit from user's wallet.


Parameters

Name Description
UG-Data-Signature * required
string
( header )
Encrypted signature
UG-Agent * required
string
( header )
The agent name are provided from Operator.
UG-Sub-Agent
string
( header )
The sub agent are registered under Operator .
Request Content * required
JSON
( body )
Example Value | Model
                        

{

"username" : "benjamin" ,

"ref_txn_id" : "52c099df-e4cc-4bb1-9c6b-54379d47550c" ,

"amount" : 50000.00 ,

"datetime" : "2020-01-15 18:13:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"balance" : 450000.00 ,

"txn_ticket" : "6c6ab819-364a-4442-b4bc-7c5d94f2638f" ,

"ref_txn_id" : "52c099df-e4cc-4bb1-9c6b-54379d47550c" ,

"datetime": "2020-01-17 12:23:14"

}

400 Example Value | Model
                        

{

"status" : "USER_EXIST",

}

Check user's wallet transfer credit records .


Parameters

Name Description
UG-Data-Signature * required
string
( header )
Encrypted signature
UG-Agent * required
string
( header )
The agent name are provided from Operator.
UG-Sub-Agent
string
( header )
The sub agent are registered under Operator .
Request Content * required
JSON
( body )
Example Value | Model
                        

{

"username" : "benjamin" ,

"date_start" : "2020-01-16" ,

"date_end" : "2020-01-16" ,

"datetime" : "2020-01-15 18:13:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"username" : "benjamin" ,

"data" : [{

"type" : "deposit" ,

"txn_ticket" : "071cf683-5da9-4498-9907-d93c367267b0" ,

"ref_txn_id" : "52c099df-e4cc-4bb1-9c6b-54379d47550c" ,

"amount" : 5000000.00 ,

"datetime" : "2020-01-16 07:54:45" ,

"status" : "OK" ,

},{

"type" : "withdraw" ,

"txn_ticket" : "5f813ecc-f3b4-426f-9d83-e9bb2fd39c7e" ,

"ref_txn_id" : "12fd26df-e42c-a1b1-9c6b-5a154d47os51d" ,

"amount" : 6000000.00 ,

"datetime" : "2020-01-16 07:56:45" ,

"status" : "INSUFFICIENT_CREDIT" ,

}] ,

"datetime": "2020-01-17 12:23:14"

}

400 Example Value | Model
                        

{

"status" : "USER_NOT_EXIST",

}

Request user's credit balance from Operator side .


Parameters

Name Description
UG-Data-Signature
string
( header )
Encrypted signature
Request Content
JSON
( body )
Example Value | Model
                        

{

"token" : "1a9c7a36-8b56-45c4-b50e-721838be4d6d" ,

"datetime" : "2020-01-17 18:23:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"username" : "benjamin",

"balance" : 5000000.00 ,

"datetime" : "2020-01-17 18:23:23"

}

Request billing bet amount from Operator side .


Parameters

Name Description
UG-Data-Signature
string
( header )
Encrypted signature
Request Content
JSON
( body )
Example Value | Model
                        

{

"game_id" : 601 ,

"token" : "1a9c7a36-8b56-45c4-b50e-721838be4d6d" ,

"txn_ticket" : "TXP-54001652" ,

"amount" : -5000.00 ,

"currency" : "BTC" ,

"datetime" : "2020-01-17 18:23:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"username" : "benjamin",

"balance" : 4995000.00 ,

"ref_txn_id" : "547f5c4f-0ec7-4655-8773-08f8d78b3d81" ,

"datetime" : "2020-01-17 18:23:23"

}

Send a multiple transactions to Operator side .


Parameters

Name Description
UG-Data-Signature
string
( header )
Encrypted signature
Request Content
JSON
( body )
Example Value | Model
                        

{

"game_id" : 601 ,

"token" : "1a9c7a36-8b56-45c4-b50e-721838be4d6d" ,

"txns" : [{

"txn_ticket" : "TXP-54001652" ,

"type" : "BET" ,

"amount" : -5000.00 ,

"datetime" : "2020-01-17 18:23:23" ,

},{

"txn_ticket" : "TXP-54001652" ,

"type" : "WON" ,

"amount" : 10000.00 ,

"datetime" : "2020-01-17 18:23:23" ,

},{

"txn_ticket" : "TXP-54001653" ,

"type" : "BET" ,

"amount" : -10000.00 ,

"datetime" : "2020-01-17 18:23:23" ,

},{

"txn_ticket" : "TXP-54001653" ,

"type" : "WON" ,

"amount" : 0.00 ,

"datetime" : "2020-01-17 18:23:23" ,

}],

"currency" : "BTC" ,

"datetime" : "2020-01-17 18:23:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"username" : "benjamin",

"balance" : 5000000.00 ,

"ref_txn_id" : "547f5c4f-0ec7-4655-8773-08f8d78b3d81" ,

"datetime" : "2020-01-17 18:23:23"

}

Send bet result to Operator side .

if the amount is 0 , its consider LOSE .


Parameters

Name Description
UG-Data-Signature
string
( header )
Encrypted signature
Request Content
JSON
( body )
Example Value | Model
                        

{

"game_id" : 601 ,

"token" : "1a9c7a36-8b56-45c4-b50e-721838be4d6d" ,

"txn_ticket" : "TXP-54001652" ,

"amount" : 0.00 ,

"currency" : "BTC" ,

"datetime" : "2020-01-17 18:23:23",

}


Responses

Status code Description
200 Example Value | Model
                        

{

"status" : "OK",

"username" : "benjamin",

"balance" : 5000000.00 ,

"ref_txn_id" : "547f5c4f-0ec7-4655-8773-08f8d78b3d81" ,

"datetime" : "2020-01-17 18:23:23"

}

Case happening some game are responded wrong result and requested to rollback.

the network deley issue cause REQUEST_TIMEOUT will triggers rollback too.

Operator need to bill/refund credit from members if the transaction are already charged/payout by this txn_ticket.


Parameters

Name Description
UG-Data-Signature
string
( header )
Encrypted signature
Request Content
JSON
( body )
Example 1 Value | Model
                        

{

"game_id" : 601 ,

"token" : "1a9c7a36-8b56-45c4-b50e-721838be4d6d" ,

"txn_ticket" : "TXP-54001652" ,

"type" : "BET" ,

"amount" : -5000.00 ,

"currency" : "BTC" ,

"datetime" : "2020-01-17 18:23:23",

}


Example 2 Value
                        

{

"game_id" : 601 ,

"token" : "1a9c7a36-8b56-45c4-b50e-721838be4d6d" ,

"txn_ticket" : "TXP-54001652" ,

"type" : "WON" ,

"amount" : 5000.00 ,

"currency" : "BTC" ,

"datetime" : "2020-01-17 18:23:23",

}


Responses

Status code Description
200 Example 1 Value | Model
                        

{

"status" : "OK",

"username" : "benjamin",

"balance" : 5005000.00 ,

"ref_txn_id" : "547f5c4f-0ec7-4655-8773-08f8d78b3d81" ,

"datetime" : "2020-01-17 18:23:23"

}


Example 2 Value
                        

{

"status" : "OK",

"username" : "benjamin",

"balance" : 4995000.00 ,

"ref_txn_id" : "547f5c4f-0ec7-4655-8773-08f8d78b3d81" ,

"datetime" : "2020-01-17 18:23:23"

}

Appendix : Currency hide

Code Currency
IDR Indonesia Rupiah
MYR Malaysia Ringgit
VND Vietnamese Dong
CNY Chinese Yuan
THB Thai Baht
USD United State Dollar
PHP Philippine Peso
HKD Hong Kong Dollar
SGD Singapore Dollar
MMK Myanmar Kyat
INR Indian Rupee
BND Brunei Dollar
VND2 ( 1: 1000 ) Vietnamese Dong

Appendix : Games hide

category game id provider brand type
SPORT 201 UG-SportBook lobby
SPORT 202 SBO-SportBook lobby
SPORT 203 BTI-SportBook lobby
SLOT 301 GamePlay list
SLOT 302 ISoftBet list
SLOT 303 Habanero list
SLOT 304 TopTrendGaming list
SLOT 305 Joker list
SLOT 306 MicroGaming list
SLOT 307 SimplePlay lobby
LIVECASINO 401 AsiaGaming lobby
LIVECASINO 402 SAGaming lobby
LIVECASINO 403 GamePlay lobby
LIVECASINO 404 MicroGaming lobby
LIVECASINO 405 EBET lobby
RNG 501 UltimateGaming list
RNG 502 Joker list
P2P 601 1GPoker lobby
FISHING 701 Joker list
COCKFIGHT 801 S128 lobby

Appendix : Response Status hide

Status Code Description
OK Successfully.
UNKNOWN_ERROR General error status, for cases without a special error code.
INVALID_PARTNER Operator or their sub_partner is disabled or incorrect sub_partner_id is sent.
INVALID_TOKEN Token unknown to Operator's system. Please, note that there is a different status for expired tokens.
INVALID_GAME_ID Unknown game_id. NOTE: in case of game providers with game lobby (Live Dealers), user can switch games within one game session. We track such changes and send game_id of the game which the user is actually playing at the moment. Note that game_id may change within one game session.
INVALID_CURRENCY Transaction currency differs from User's wallet currency.
INSUFFICIENT_CREDIT Not enough credit on User's balance to place a bet. Please send the actual balance together with this status.
USER_DISABLED User is disabled/locked and can't place bets.
INVALID_SIGNATURE Operator couldn't verify signature on request from UG396.
TOKEN_EXPIRED Session with specified token has already expired. NOTE: token validity MUST NOT be validated in case of wins and rollbacks, since they might come long after the bets.
INVALID_SYNTAX Received request doesn't match expected request form and syntax.
INVALID_METHOD The method of submition must be POST .
INVALID_TYPES Type of parameters in request doesn't match expected types.
DUPLICATE_REF_TXN_ID A transaction with same transaction_uuid was sent, but there was a different amount, currency, round, user or game.
TXN_DOES_NOT_EXIST Returned when the bet referenced in win request can't be found on Operator's side (wasn't processed or was rolled back). If you received rollback request and can't find the transaction to roll back.
TXN_ROLLED_BACK Operator received rollback request for a transaction which was already rolled back. This status is for cases when the transaction_uuid of the second rollback is different from the initial. If it's same transaction_uuid, then ensure idempotency and respond as you responded initially.
USER_EXIST The username are used .
USER_NOT_EXIST Username are not exists in wallets system .
REQUEST_TIMEOUT The system only proceed request within 10 sec of datetime from requested content. Operator must be prevent and beware of request time management before proceed request .
If Seamless wallets , Operator have to making a good data trafic struture to ensure server able to handle callback request within 10 sec. While REQUEST_TIMEOUT from callback , The System will proceed TXN_ROLLED_BACK for refunding track.

Appendix : Seamless Transaction Type hide

Type Desc
SITIN Debit and member join to table.
STANDUP Credit and Member quit from table.
JACKPOT Member won a jackpot and credit.
FREEJACKPOT Member won a free jackpot and credit.
REFUND Credit failed and system will recall again.

Appendix : Models hide

variables descriptions
SPORT 201
SPORT 202
SPORT 203
SLOT 301
SLOT 302
SLOT 303
SLOT 304
SLOT 305
SLOT 306
SLOT 307
LIVECASINO 401
LIVECASINO 402
LIVECASINO 403
LIVECASINO 404
LIVECASINO 405
RNG 501
RNG 502
P2P 601
FISHING 701
COCKFIGHT 801