Game Open API (Transfer) (2.1.0)

Download OpenAPI specification:Download

Call API Mode

REST API

Method: GET/POST, depends on each endpoint specification

Format: JSON

Uri prefix: /gameapi/v2

Example:

POST /gameapi/v2/create_player HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: <api server>
Connection: close
Content-Length: 255

Request:

{
  "merchant_code": "04e17735ba374dcd898746c6ac8118e4",
  "auth_token": "59ddb8dd71f8494485ff200f78bc4dba",
  "username": "merchant.player2",
  "sign": "20fbee96a0f436a6d8386b192a569a27bcc1c689"
}

Response:

{
  "success": true,
  "code": 0,
  "detail": {
    "id": 11216,
    "role": 3,
    "username": "o2p1632998628",
    "company": 11198
  }
}

Standard result:

  • success: Boolean, indicates whether the action succeeded. If false, the "message" field provides error details.
  • code: Result code, only for backward compatibility.
  • message: string, if the operation fails (success: false), this provides the error message. Please refer to Error List for details.
  • detail: Response payload details depending on the specific API endpoint.

Game List

  • Updated monthly based on popularity

Lobby

Game Code Name
lobby Game Lobby

Classic

Game Code Game Tag Name RTP Rank of last month Released
football 2 Goal Win 96% New 2026/04/22
crash2 2 Shadow Rush 96% New 2026/03/16
road 1 Ice Hop 95% ~ 97% New 2025/11/10
crash 1 Crash 98.99% 1 2022/6/30
baccarat 1 Baccarat 98.99% 2 2024/12/26
triple 1 Triple 96.5% 3 2022/6/30
plinko 1 Plinko 92.3% ~ 96.6% 4 2022/6/30
mine 1 Mine 96.96% 5 2022/6/30
coin 1 Goal 97% 6 2022/6/30
dice 1 Lucky Beer 98% - 2022/6/30
limbo 1 Limbo 94% ~ 95% - 2022/6/30
space-max 2 Space Max 98.99% - 2023/5/15
double 1 Double 95% - 2022/6/30
keno 1 Keno 92% - 2022/6/30
crypto 1 Crypto 97% - 2022/6/30
hilo 1 Hilo 98% - 2022/6/30
tower 1 Tower 96% - 2022/6/30
bingo 1 Bingo 92% - 2023/3/1
poker 1 Video Poker 98.37% - 2023/4/1
wheel 1 Wheel 96% ~ 97% - 2023/6/30
nine 1 Nine 92% - 2023/10/4
color 1 Color 95% - 2024/1/3
racing 1 Racing 95% - 2024/1/26
space 1 Space 95% - 2024/8/8

Monster

Game Code Game Tag Name RTP Rank of last month Released
m-mine 3 Monster Mine 96.96% 1 2023/9/1
m-plinko 3 Rock Plinko 92.3% ~ 96.6% 2 2023/9/1
m-tower 3 Monster Tower 96% 3 2023/9/1
m-fight 3 Monster Fight 97% 4 2023/9/1
m-crypto 3 Monster Crypto 97% - 2023/9/1
m-triple 3 Monster Triple 96.5% - 2023/9/1
m-hilo 3 Monster HiLo 98% - 2024/3/1
m-dice 3 Monster Dice 98% - 2024/3/1
m-crash 3 Monster Crash 98.99% - 2024/4/9

Scratch

Game Code Game Tag Name RTP Released
3001 10 Happy Farm 95% 2024/1/25
3002 10 Opportunity 10 92% 2024/1/25
3003 10 Ultra 777 93% 2024/1/25
3004 10 Gem Bomb 92% 2024/1/25
3005 10 Mad Scientist 93% 2024/1/25
3006 10 Beach NiuNiu 92% 2024/1/25

Slot

Game Code Game Tag Name RTP Released
7001 30 Molten Dragon 94.04% 2024/9/12
7002 30 Magic Girl 92% ~ 95% 2024/9/12
7003 30 Jungle Travel 92% ~ 95% 2024/9/12
7005 30 Hash Tiger 92% ~ 95% 2026/6/18
7007 30 Hash Rabbit 92% ~ 95% 2026/6/18
7008 30 Pyramid Paws 92% ~ 95% 2026/9/3
7009 30 Wild Fox 92% ~ 95% 2026/9/3

Lottery

Game Code Game Tag Name RTP Released
lottery_lobby 20 Lottery Lobby 95% 2025/12/15
5001 20 Lotinha 95% 2025/12/15
5002 20 Quininha 95% 2025/12/15
5003 20 Seninha 95% 2025/12/15
5011 20 60s 5D 95% 2025/12/15
5012 20 300s 5D 95% 2025/12/15
5013 20 600s 5D 95% 2025/12/15
5016 20 60s PK10 95% 2025/12/15
5017 20 300s PK10 95% 2025/12/15
5018 20 600s PK10 95% 2025/12/15
5021 20 60s K3 95% 2025/12/15
5022 20 300s K3 95% 2025/12/15
5023 20 600s K3 95% 2025/12/15
5036 20 60s HK6 95% 2025/12/15
5037 20 300s HK6 95% 2025/12/15
5038 20 600s HK6 95% 2025/12/15
5041 20 60s WinGo 95% 2025/12/15
5042 20 300s WinGo 95% 2025/12/15
5043 20 600s WinGo 95% 2025/12/15
5046 20 Hash28 60s 95% 2025/12/15
5047 20 Hash28 300s 95% 2025/12/15
5048 20 Hash28 600s 95% 2025/12/15
5051 20 VN North 60s 95% 2025/12/15
5052 20 VN North 300s 95% 2025/12/15
5053 20 VN North 600s 95% 2025/12/15
5056 20 VN Central 60s 95% 2025/12/15
5057 20 VN Central 300s 95% 2025/12/15
5058 20 VN Central 600s 95% 2025/12/15
5061 20 VN South 60s 95% 2025/12/15
5062 20 VN South 300s 95% 2025/12/15
5063 20 VN South 600s 95% 2025/12/15
5066 20 SicBo 60s 95% 2025/12/15
5067 20 SicBo 300s 95% 2025/12/15
5068 20 SicBo 600s 95% 2025/12/15

Error List

Code Message Description
1 InvalidSignature Invalid signature
2 InvalidMerchantCode Invalid merchant code
3 InvalidSecureKey Invalid secure key
4 InvalidAuthToken Invalid authentication token
5 InvalidGamePlatformId Invalid game platform ID
6 InvalidUsername Invalid username
7 InvalidPassword Invalid password
8 DuplicateUsername Duplicate username
9 InvalidExtraInfo Invalid extra information
10 InvalidGamePlatformSettings Invalid game platform settings
11 InvalidBetLimit Invalid bet limit configuration
12 InvalidActionType Invalid action type
13 InvalidAmount Invalid amount
14 DuplicateExternalTransId Duplicate external transaction ID
15 NoEnoughBalance Insufficient balance
16 InvalidFromDateTime Invalid start date/time
17 InvalidToDateTime Invalid end date/time
18 InvalidExternalTransId Invalid external transaction ID
19 SecureKeyNotAllowed Secure key not allowed
20 BonusRequired Bonus group is required
21 InvalidBonus Invalid bonus group
22 InvalidRebate Invalid rebate percentage
23 AccountDuplicated Account username duplicated
24 SubAccountNotFound Specified sub-account not found
25 InvalidParent Invalid parent agent
26 RequestDataRequired Request data is required
27 RequestTooFast Request rate exceeded
28 TransactionIdRequired Transaction ID or external transaction ID is required
29 PlayerNotFound Player not found
30 InvalidGameCode Invalid game code
31 BetNotFound Bet not found

Security Mode

Server Domain or IP

Hide the internal server domain or IP from players.

IP Whitelist

Configure allowed IP addresses on your servers.

For the staging environment, it is necessary to add allowed IPs for visiting game front-end through the Back Office.

Merchant Code and Secure Key

Any 32 characters (letters and numbers), provided via email.

Testing key: dd35aPO0bd186dc6ace6We2e0fb48s70

Sign Key

Any 32 characters (letters and numbers), provided via email.

Testing key: dd35aPO0bd186dc6ace6We2e0fb48s70

Signature

  1. Always use UTF-8 encoding.
  2. Ignore empty fields, fields with value of object type, or fields named sign.
  3. Sort all parameter names in alphabetical (ascending) order.
  4. Concatenate all non-empty values into a single string (values only, without keys), append the sign key at the end, and then compute the SHA1 hash to obtain the signature.

Signature Example:

Suppose the sign key is SIGN_KEY_EXAMPLE, and we need to sign the following parameter object:

{
  "b": 1.1,
  "a": 1,
  "d": "some string",
  "e": "",
  "c": true,
  "sign": "abcdefg",
  "g": {
    "x": 1,
    "y": 2
  },
  "f": null
}

The signing procedure is as follows:

  1. Ignore fields without value, of object type, or named sign:

    {
      "b": 1.1,
      "a": 1,
      "d": "some string",
      "c": true
    }
    
  2. Order params by key ascendingly:

    {
      "a": 1,
      "b": 1.1,
      "c": true,
      "d": "some string"
    }
    
  3. Concatenate values in the sorted order and append the sign key:

    11.1truesome stringSIGN_KEY_EXAMPLE
    
  4. Perform SHA1 hash on the concatenated string to obtain the signature:

    91bef33b208ba98ac2d889b9c4e996651ca58146
    

Authentication

  • Retrieve auth_token using merchant_code and secure_key.
  • Include auth_token as a parameter when invoking any API endpoint.

Authentication

Generate Token

Generate token by merchant code and secure key

  • if timeout less than 600, will generate new auth token and refresh timeout
Request Body schema: application/json
merchant_code
required
string
secure_key
required
string
sign
required
string

signatrue of request payload, created by rule written in Security Mode

Responses

Request samples

Content type
application/json
{
  • "merchant_code": "string",
  • "secure_key": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Player

Create player

create player account

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore

sign
required
string

signatrue of request payload, created by rule written in Security Mode

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Query Player

query player detail

query Parameters
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore

sign
required
string

signatrue of request payload, created by rule written in Security Mode

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Kick player

kick player

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore

sign
required
string

signatrue of request payload, created by rule written in Security Mode

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": "ok"
}

Block player

block player

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore

sign
required
string

signatrue of request payload, created by rule written in Security Mode

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Unblock player

unblock player

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore

sign
required
string

signatrue of request payload, created by rule written in Security Mode

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Chain

Launch Game

launch game

query Parameters
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
game_code
required
string

Values of Game Code in Game List section

If game code is passed with value lobby, the url will launch game lobby

username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore

language
required
string
Enum: "en" "zh" "vi" "th" "id" "pt" "ar" "de" "es-MX" "es" "fr" "hu" "it" "ro" "ko" "ja" "tr" "ru"
Value Language mini Scratch slot lottery
en English o o o o
zh Simplified Chinese o o o o
vi Vietnamese o o
th Thai o o (not available to 3001) o
id Indonesian o o (not available to 3001) o
pt Portuguese o o (not available to 3001) o
ar Arabic o o
de German o o
es-MX Mexican Spanish o o
es Spanish o o
fr French o o
hu Hungarian o o
it Italian o o
ro Romanian o o
ko Korean o o (not available to 3001) o
ja Japanese o o (not available to 3001) o
tr Turkish o o (not available to 3001) o
ru Russian o o
sign
required
string

signatrue of request payload, created by rule written in Security Mode

home_link
string

If provided, game UI will display a button to navigate user to this url

trial
boolean

whether launch trial game or not

  • if true, will launch trial game
  • if not passed or false, will launch normal game
  • player in trial game is different from original player, and will have 2000 trial credit which cannot be used in transfer; trial game bet history is not provided in open API

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Transaction

Transfer Player Fund

deposit to player or withdraw from player

Request Body schema: application/json
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore

action_type
required
string
Enum: "deposit" "withdraw"

deposit or withdraw

amount
required
number

always positive

external_trans_id
required
string <= 64 characters

transaction from external system

sign
required
string

signatrue of request payload, created by rule written in Security Mode

Responses

Request samples

Content type
application/json
{
  • "auth_token": "stringstringstringstringstringst",
  • "merchant_code": "string",
  • "username": "string",
  • "action_type": "deposit",
  • "amount": 0,
  • "external_trans_id": "string",
  • "sign": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Query Transaction

One of transaction_id or external_trans_id is required

transaction_id

query Parameters
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
sign
required
string

signatrue of request payload, created by rule written in Security Mode

transaction_id
integer

transaction_id returned from transfer_player_fund API

external_trans_id
string

external_trans_id used to invoke transfer_player_fund

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}

Query Player Balance

query player balance

query Parameters
auth_token
required
string 32 characters

from authentication API

merchant_code
required
string
username
required
string [ 6 .. 100 ] characters

only letter, number, hyphen, underscore

sign
required
string

signatrue of request payload, created by rule written in Security Mode

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "code": 0,
  • "detail": {
    }
}