Royal Slot Gaming API Integration Seamless Wallet Reference
1. Brief Introduction
1-1 Site Restrictions
This system allows creation of multiple sites by merchant.
1-2 Player Restrictions
This system allows creation of multiple member accounts under each site
built respectively by merchant.
1-3 Login Restrictions
This system does not allow simultaneous login by members. Where the
login reaches limit, the first login will be logged out and the second login will be allowed.
1-4 Currency Restrictions
This system allows a member to own accounts in different currencies.
Accounts for different currencies shall be created respectively.
1-5 Explanations on Names
System Code: Code filled in by merchant upon application for using this system.
Web ID: The merchant may set respective codes for multiple sites.
1-6 The Game System provides the following APIs
API Name | Description |
---|---|
SingleWallet/Player/CreatePlayer | Create Member Account (Accounts by Currencies) |
SingleWallet/Game/GameList | Get List of Games |
SingleWallet/Player/GetURLToken | Get Game URL (Enter Game) |
SingleWallet/Player/GetLobbyURLToken | Get Game Lobby URL (Enter Game Lobby) |
SingleWallet/Player/PlayerOnlineList | Get List of Members in the Game |
SingleWallet/Player/Kickout | Kick Out Members in the Game |
SingleWallet/Player/GetPlayerOnlineStatus | Query Online Status of Member |
SingleWallet/History/GetGameDetail | Get Game Details |
SingleWallet/Report/GetGameMinReport | Get Game Minute Report |
SingleWallet/Report/GetGameHourReport | Get Game Hour Report |
SingleWallet/Report/GetGameHourReportAllGameType | Get Game Hour Report (All Game Types) |
SingleWallet/Report/GetGameDailyReport | Get Game Daily Report |
SingleWallet/Report/GetGameDailyReportAllGameType | Get Game Daily Report (All Game Types) |
SingleWallet/Player/GetGameMinDetailURLToken | Get Game History URL for Certain Account at Certain Minute(s) |
SingleWallet/Player/GetGameMinDetailURLTokenBySeq | Get Game History URL for Certain Account at Certain Minute(s) (By Seq) |
SingleWallet/Player/GetSlotGameRecordURLToken | Get Game Record in Slot History of a Certain Account |
SingleWallet/Jackpot/GetJackpotHitRec | Get Jackpot Record |
SingleWallet/History/GetSeqResult | Get Value of Points Won under Specific Serial Number |
1-7 The Merchant provide the following APIs
API Name | Description |
---|---|
GetBalance | Obtain Balance |
Bet | Place Bet |
BetResult | Settle |
JackpotResult | Jackpot |
CancelBet | Cancel Bet |
2. Flow Chart
2-1 Create Member Account (Accounts by Currencies)
2-2 Game Entering Process
3. API Use Descriptions
3-1 Interfacing Information
The system provides a merchant the information as follows:
Field Name | Description |
---|---|
Client ID | String values containing numbers and English letters |
Client Secret | String value containing special symbols, used for md5 encryption calculation |
Deskey | Key used for DES-CBC encryption and decryption |
DesIV | Offset used for DES-CBC encryption and decryption |
3-2 Send Request
1. Request Body is required to be“Msg=Sent Parameter (JSON format) for performing DES-CBC results after encryption”
2. Header is required to be the following three items
Header | Content |
---|---|
X-API-ClientID | Client ID provided by system |
X-API-Signature | MD5 (Client ID+Client Secret+Timestamp+parameter result after encryption) |
X-API-Timestamp | Current unix timesamp |
3. Make POST Request on URL to be operated
4. FAQ
The request Body DOES NOT include Msg=
❌ The request body only contains the encrypted result but DOES NOT include Msg=.
xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
✅ The request body must include Msg=.
Msg=xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
The request body uses double quotes.
❌ The request body uses double quotes.
Msg="xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE="
✅ The request body DOES NOT use double quotes.
Msg=xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
The response body includes Msg=
❌ The response body includes Msg=
Msg=xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
✅ The response body DOES NOT include Msg=
xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
For numeric types in request parameters (e.g., int, decimal), use double quotes.
Take the API parameter GameId in 5-3 as an example.
❌ For numeric types in request parameters (e.g., int, decimal), use double quotes.
{ "GameId":"1" }
✅ Numeric types in request parameters (e.g., int, decimal) DO NOT use double quotes marks.
{ "GameId":1 }
3-3 Encryption Example
Original Data
Field Name | Content |
---|---|
Client ID | 3df82c9b0af3 |
Client Secret | p@ssw0rd |
Current unix timestamp | 1494946640 |
DesKey | N5MF76P7 |
DesIV | 4ANG4ACY |
Parameter | {"SystemCode":"TestSystem"} |
DES-CBC
{"SystemCode":"TestSystem"} => xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
md5 Encryption
3df82c9b0af3p@ssw0rd1494946640xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
MD5 => 9b58bd658add3e92ed214b6c3c0cbc87
Request Data
POST / request_url
Content-Type | application/x-www-form-urlencoded |
X-API-ClientID | 3df82c9b0af3 |
X-API-Signature | 9b58bd658add3e92ed214b6c3c0cbc87 |
X-API-Timestamp | 1494946640 |
Msg= | xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE= |
3-4 Code DES Example
shown on the right (click on the php or csharp menu)
/// <summary>加密</summary>
$encrypt_data = openssl_encrypt($data,'DES-CBC',$DesKey,OPENSSL_RAW_DATA ,$DesIV);
$req_base64 = base64_encode($encrypt_data);
var_dump($req_base64);
/// <summary>解密</summary>
$data = openssl_decrypt(base64_decode($req_base64),'DES-CBC',$DesKey,OPENSSL_RAW_DATA ,$DesIV);
var_dump($data);
/// <summary>Encrypt</summary>
public static string DESEncryption(string plainText, string key, string iv)
{
using(var des = DES.Create())
{
des.Mode = CipherMode.CBC;
des.Padding = PaddingMode.PKCS7;
des.Key = Encoding.UTF8.GetBytes(key);
des.IV = Encoding.UTF8.GetBytes(iv);
byte[] plainByteArray = Encoding.UTF8.GetBytes(plainText);
byte[] cipherByteArray = des.CreateEncryptor().TransformFinalBlock(plainByteArray, 0,
plainByteArray.Length);
string cipherText = Convert.ToBase64String(cipherByteArray);
return cipherText;
}
}
/// <summary>Decrypt</summary>
public static string DESDecrypt(string text, string key, string iv)
{
using (var des = DES.Create())
{
des.Mode = CipherMode.CBC;
des.Padding = PaddingMode.PKCS7;
des.Key = Encoding.UTF8.GetBytes(key);
des.IV = Encoding.UTF8.GetBytes(iv);
byte[] plainByteArray = Convert.FromBase64String(text);
byte[] cipherByteArray = des.CreateDecryptor().TransformFinalBlock(plainByteArray, 0,
plainByteArray.Length);
string cipherText = Encoding.UTF8.GetString(cipherByteArray);
return cipherText;
}
}
3-5 Code MD5 Example
shown on the right (click on the php or csharp menu)
$encrypt_data = openssl_encrypt($data,'DES-CBC',$key,OPENSSL_RAW_DATA ,$iv);
$req_base64 = base64_encode($encrypt_data);
$timestamp=time();
/// <summary>Generate Signature</summary>
$signature_data=$clientid.$clientsecret.$timestamp.$req_base64;
$signature=md5($signature_data);
/// <summary>Generate Signature</summary>
public static string CreateSignature(string clientID, string clientSecret, string timestamp, string
encryptData)
{
using(var md5 = MD5.Create())
{
var inputText = clientID + clientSecret + timestamp + encryptData;
var inputByteArray = Encoding.UTF8.GetBytes(inputText);
var outputByteArray = md5.ComputeHash(inputByteArray);
var outputText = ByteToHexBitFiddle(outputByteArray);
return outputText;
}
}
public static string ByteToHexBitFiddle(byte[] bytes)
{
char[] c = new char[bytes.Length * 2];
int b;
for (int i = 0; i < bytes.Length; i++)
{
b = bytes[i] >> 4;
c[i * 2] = (char)(55 + b + (((b - 10) >> 31) & -7));
b = bytes[i] & 0xF;
c[i * 2 + 1] = (char)(55 + b + (((b - 10) >> 31) & -7));
}
return new string(c);
}
3-6 Call API Example
Send
Send
{
"SystemCode":"TestSystem",
"WebId":"Uy2m48TRCUo",
"UserId":"497OHx21A0gInxza7zJj",
"UserType":1,
"Currency":"KRW"
}
Response
{
"ErrorCode":0,
"ErrorMessage":"OK",
"Timestamp":1584512886,
"Data":
{
"SystemCode":" TestSystem",
"WebId":"Uy2m48TRCUo",
"UserId":"497OHx21A0gInxza7zJj"
}
}
POST /SingleWallet/Player/CreatePlayer HTTP/1.1
Host: 192.168.1.102:8866
Content-Type: application/x-www-form-urlencoded
X-API-ClientID: 3df82c9b0af3
X-API-Signature: 45d828b54aa091a5b137351e64673258
X-API-Timestamp: 1494946640
shown on the right (click on the json menu)
4. API Request, Header and Return Information Descriptions
4-1 Request URL
Name | Content |
---|---|
URL | http://<server>/<API Name> |
Method | POST |
4-2 Header
Each API request is required to contain the following Header, or otherwise the error code will be returned. For error codes, please refer to 9-1
Name | Type | Required | description |
---|---|---|---|
X-API-ClientID | String | Y | ID of requesting connection end |
X-API-Signature | String | Y | Signature of Request |
X-API-Timestamp | String | Y | Timestamp of Request in format of unix timestamp |
The incoming Timestamp with calls more than 30 seconds from current time will be listed as illegal call. The Invalid decrypt error message will be returned.
4-3 Incoming Parameter Descriptions
In each API request, the incoming Key is request. The Value will be in JSON format encoded using UTF-8 (For related information, please refer to “5. Game System API Descriptions”), which are data encrypted via DES; therefore, the values need to be decrypted as well as certified via MD5 before use, or otherwise the error message Invalid decrypt will be returned.
4-4 Return Information Descriptions
When successful
{
"ErrorCode":0,
"ErrorMessage":"OK",
"Timestamp":1584512886,
"Data":
{
"SystemCode":" TestSystem",
"WebId":"Uy2m48TRCUo",
"UserId":"497OHx21A0gInxza7zJj"
}
}
When failed
{
"ErrorCode":2001,
"ErrorMessage":"Illegal arguments.",
"Timestamp":1584512886,
"Data":null
}
Each API, no matter with successful or failed execution, will be in JSON format encoded via UTF-8 and encrypted via DES before return. In addition, the contents shall contain the following information (For information of JSON format in data, please refer to “5. Game System API Descriptions”).
Name | Type | Description |
---|---|---|
ErrorCode | Int | Error Code. For details, please refer to 9-1 Table of Error Codes |
ErrorMessage | String | Error message. For details, please refer to 9-1 Table of Error Codes |
Timestamp | Long | Timestamp |
Data | Object | API call the returning object / object array in JSON format |
Example (This example is in plaintext)
/SingleWallet/Player/CreatePlayer returns information as shown in the following table
Name | Type | Description |
---|---|---|
Data | Object | |
Data/SystemCode | String | System Code |
Data/WebId | String | Web ID |
Data/UserId | String | The Only ID of a Member |
The JSON format of success and failure is as shown on the right (click on the json menu)
5. Game System API Descriptions 🚀
The following three major types of error codes may be received by all APIs
Error Code | Error Message | Description |
---|---|---|
0 | OK | Normal |
1xxx | System error or under maintenance | |
2xxx | Error in Parameter Input Verification |
5-1 Create Member Account(Accounts by Currencies)
API Name:SingleWallet/Player/CreatePlayer
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID (Letters and Numbers only) |
UserId | String | 3~20 | Y | Only ID of a Player (Letters and Numbers only) |
Currency | String | 2~5 | Y | Currency Code (Refer to Table of Code) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/SystemCode | String | System Code |
Data/WebId | String | Web ID |
Data/UserId | String | The Only ID of a Member |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3010 | The player's currency already exists. | This player account has already existed |
3011 | Deny permission for system. | SI Permission Insufficient |
3018 | This currency is not allowed. | This currency is not allowed. |
Note: For WebId, please set custom Web ID following rules in description (backend addition in advance not required)
5-2 Get List of Games
API Name:SingleWallet/Game/GameList
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/GameList | Array | |
Data/GameList/GameId | Int | Game Code (Refer to Table of Code) |
Data/GameList/GameType | Int | Game Type (1: Slot Game 2: Fishing Slot) |
Data/GameList/GameName | Object | |
Data/GameList/GameName/en_US | String | Game Name (English) |
Data/GameList/GameName/zh_TW | String | Game Name (Traditional Chinese) |
Data/GameList/GameName/zh_CN | String | Game Name (Simplified Chinese) |
Data/GameList/GameName/th_TH | String | Game Name (Thai) |
Data/GameList/GameName/ko_KR | String | Game Name (Korean) |
Data/GameList/GameName/ja_JP | String | Game Name (Japanese) |
Data/GameList/GameName/en_MY | String | Game Name (Burmese) |
Data/GameList/GameName/id_ID | String | Game Name (Bahasa Indonesia) |
Data/GameList/RollerSpec | String | Roller Specifications |
Data/GameList/LineType | String | Line Type |
Data/GameList/LineNumber | String | Number of Lines |
Data/GameList/GameStatus | Int | Game Status (1: Normal 2: Under Maintenance) |
Data/GameList/GamePicUrl | String | Game Picture URL (Provided in Alternative Manners) |
Data/GameList/GameResUrl | String | Game Resource URL (Provided in Alternative Manners) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
5-3 Get Game URL(Enter Game)
API Name:SingleWallet/Player/GetURLToken
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID (Letters and Numbers only) |
UserId | String | 3~20 | Y | Only ID of a Player (Letters and Numbers only) |
UserName | String | 1~20 | Y | User Nickname |
GameId | Int | Y | Game Code (Refer to Table of Code) | |
Currency | String | 2~5 | Y | Currency Code (Refer to Table of Code) |
Language | String | 5 | Y | Language Code (Refer to Table of Code) |
ExitAction | String | 0~255 | Y | Redirect member to specific URL when exiting the game |
- Return Information Descriptions
Name | Type | description |
---|---|---|
Data | Object | |
Data/URL | String | URL for entering the Game |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3008 | The player's currency doesn't exist. | This player account does not exist |
3011 | Deny permission for system. | SI Permission Insufficient |
3012 | Deny permission for game. | Game permission insufficient |
3018 | This currency is not allowed. | This currency is not allowed. |
Note: When ExitAction contains empty string ( ExitAction=”” ) , the window will be shut down after leaving the game
5-4 Get Game Lobby URL(Enter Game Lobby)
API Name:SingleWallet/Player/GetLobbyURLToken
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID (Letters and Numbers only) |
UserId | String | 3~20 | Y | Only ID of a Player (Letters and Numbers only) |
UserName | String | 1~20 | Y | User Nickname |
Currency | String | 2~5 | Y | Currency Code (Refer to Table of Code) |
Language | String | 5 | Y | Language Code (Refer to Table of Code) |
ExitAction | String | 0~255 | N | Redirect member to specific URL when exiting the game |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/URL | String | URL for Entering the Game |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3008 | The player's currency doesn't exist. | This player account does not exist |
3011 | Deny permission for system. | SI Permission Insufficient |
3018 | This currency is not allowed. | This currency is not allowed. |
5-5 Get List of Members in the Game
API Name:SingleWallet/Player/PlayerOnlineList
- Incoming Parameter Descriptions
Name | Type | Length | Required | description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code(Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID(Letters and Numbers only) |
GameId | Int | Y | Game Code (Refer to Table of Code) | |
Page | Int | Y | Designate current page (from 1) | |
Rows | Int | Y | Number of rows per page (Range: 100~500) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/DataCount | Int | Total Number of Data |
Data/PageSize | Int | Rows per Page |
Data/PageCount | Int | Total Number of Pages |
Data/PageNow | Int | Current Page |
Data/UserList | Array | |
Data/UserList/WebId | String | Web ID |
Data/UserList/UserId | String | Only ID of a Player |
Data/UserList/GameId | Int | Game Code (Refer to Table of Code) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3012 | Deny permission for game. | Game permission insufficient |
5-6 Kick Out Members in the Game
API Name:SingleWallet/Player/Kickout
- Incoming Parameter Descriptions
Name | Type | Length | Required | description |
---|---|---|---|---|
KickType | String | Y | Kick Out Model coming in four types as follows 1: System, 2: Web, 3: Game, 4: Player | |
SystemCode | String | 2~20 | Y | System Code(Letters and Numbers only) |
WebId | String | 0~20 | Y | Web ID(Letters and Numbers only) |
UserId | String | 0~20 | Y | Only ID of a Player(Letters and Numbers only) |
GameId | Int | Y | If KickType is not 3, enter 0 |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/UserCount | Int | Number of Kicked Out Members |
- Overview of Specific Return Error Codes
Error Code | Error Message | description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3012 | Deny permission for game. | Game permission insufficient |
Note:
- When KickType=1, all members in the system will be kicked out,
KickType=2, all members on the site will be kicked out,
KickType=3, all members in the specific game will be kicked out,
KickType=4, specific member(s) will be kicked out
- When KickType=1, enter empty string for WebId and UserId, and enter 0 for GameId,
KickType=2, enter empty string for UserId, and enter 0 for GameId,
KickType=3, enter empty string for WebId and UserId,
KickType=4,enter 0 as GameId
This API will return number of members meeting the kick out conditions.
Members matching the conditions will be kicked out of the system in seconds.
5-7 Query Online Status of Member
API Name:SingleWallet/Player/GetPlayerOnlineStatus
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID (Letters and Numbers only) |
UserId | String | 3~20 | Y | Only ID of a Player (Letters and Numbers only) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/UserId | String | Only ID of a Player |
Data/OnlineList | Array | |
Data/OnlineList/Currency | String | Currency Code (Refer to Table of Code) |
Data/OnlineList/GameId | Int | Game Code (Refer to Table of Code) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3008 | The player's currency doesn't exist. | This player account does not exist |
3011 | Deny permission for system. | SI Permission Insufficient |
5-8 Get Game Details
API Name:SingleWallet/History/GetGameDetail
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 0~20 | Y | Web ID (Letters and Numbers only) |
GameType | Int | Y | Game Type (1. Slot Game 2. Fishing Slot) | |
TimeStart | String | 16 | Y | Start Time (yyyy-MM-dd HH:mm) |
TimeEnd | String | 16 | Y | End Time (yyyy-MM-dd HH:mm) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/GameDetail | Array | |
Data/GameDetail/Currency | String | Currency Code (Refer to Table of Code) |
Data/GameDetail/WebId | String | Web ID |
Data/GameDetail/UserId | String | Only ID of a Player |
Data/GameDetail/SequenNumber | Long | Only Number of Game Record |
Data/GameDetail/GameId | Int | Game Code (Refer to Table of Code) |
Data/GameDetail/SubGameType | Int | Subgame Code (Refer to Table of Code) |
Data/GameDetail/BetAmt | Decimal | Bet (to hundredth) |
Data/GameDetail/WinAmt | Decimal | Points Won (to hundredth) |
Data/GameDetail/PlayTime | String | Play Time |
Data/GameDetail/JackpotContribution | Decimal | Jackpot Contribution (Fifth Digit after Decimal Point) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3015 | Time is not in the allowed range. | Time not in allowed range |
Note:
The range available for query will be three minutes prior to the current time , and the max. range will be 72 hours prior to the current time. E.g. It’s 2020-04-24 16:30 now, and the range of query will fall between 2020-04-24 16:26 ~ 2020-04-21 16:31
For WebId with a value, only data under such WebId will be returned.
When WebId is with empty string, all data of such system will be returned.
The max period for each query will be five minutes. e.g. TimeStart = 2020-04-24 16:22, and TimeEnd = 2020-04-24 16:26, the data within the 5-minute period between 2020-04-24 16:22:00 ~ 2020-04-24 16:26:59 will be acquired.
5-9 Get Game Minute Report
API Name:SingleWallet/Report/GetGameMinReport
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 0~20 | Y | Web ID (Letters and Numbers only) |
GameType | Int | Y | Game Type (1. Slot Game 2. Fishing Slot) | |
TimeStart | String | 16 | Y | Start Time (yyyy-MM-dd HH:mm) |
TimeEnd | String | 16 | Y | End Time (yyyy-MM-dd HH:mm) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/GameReport | Array | |
Data/GameReport/Currency | String | Currency Code (Refer to Table of Code) |
Data/GameReport/WebId | String | Web ID |
Data/GameReport/UserId | String | Only ID of a Player |
Data/GameReport/GameId | Int | Game Code (Refer to Table of Code) |
Data/GameReport/TimeMinute | String | Time Stats (in Minutes) |
Data/GameReport/BetSum | Decimal | Bet (to hundredth) |
Data/GameReport/WinSum | Decimal | Points Won (to hundredth) |
Data/GameReport/JackpotWinSum | Decimal | Prize (to hundredth) |
Data/GameReport/NetWinSum | Decimal | Net Win/Loss Sum (to hundredth) |
Data/GameReport/SequenNumber | Long | Record Number of Game Starting at Such Minute |
Data/GameReport/RecordCount | Int | Record Count |
Data/GameReport/JackpotContributionSum | Decimal | Jackpot Contribution (Fifth Digit after Decimal Point) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3015 | Time is not in the allowed range. | Time not in allowed range |
Note:
The range available for query will be three minutes prior to the current time, and
the max. range will be 72 hours prior to the current time. e.g. It’s 2020-04-24 16:30 now, and the range of query will fall between 2020-04-24 16:26 ~ 2020-04-21 16:31For WebId with a value, only data under such WebId will be returned.
When WebId is with empty string, all data of such system will be returned.
The max. period for each query will be fifteen minutes. e.g. TimeStart =
2020-04-24 16:12, and TimeEnd = 2020-04-24 16:26, the stats for each minute
within the 15-minute period between 2020-04-24 16:12 ~ 2020-04-24 16:26:59 will be acquired.
5-10 Get Game Hour Report
API Name:SingleWallet/Report/GetGameHourReport
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 0~20 | Y | Web ID (Letters and Numbers only) |
GameType | Int | Y | Game Type (1. Slot Game 2. Fishing Slot) | |
Hour | String | 13 | Y | Query Hour (yyyy-MM-dd HH) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/GameReport | Array | |
Data/GameReport/Currency | String | Currency Code (Refer to Table of Code) |
Data/GameReport/WebId | String | Web ID |
Data/GameReport/UserId | String | Only ID of a Player |
Data/GameReport/GameId | Int | Game Code (Refer to Table of Code) |
Data/GameReport/BetSum | Decimal | Bet (to hundredth) |
Data/GameReport/WinSum | Decimal | Points Won (to hundredth) |
Data/GameReport/JackpotWinSum | Decimal | Prize (to hundredth) |
Data/GameReport/NetWinSum | Decimal | Net Win/Loss Sum (to hundredth) |
Data/GameReport/RecordCount | Int | Record Count |
Data/GameReport/JackpotContributionSum | Decimal | Jackpot Contribution (Fifth Digit after Decimal Point) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3015 | Time is not in the allowed range. | Time not in allowed range |
Note:
When Query Hour is 2021-11-23 12, the data range acquired will be 2021-11-23 12:00:00 to 2021-11-23 12:59:59.
The range available for query is two hours prior to current time , and the max.
range will be 1440 hours (within 60 days) prior to current time. e.g. It’s now 2021-11-23 14:02, and the range available for query will be 2021-09-24 14~ 2021-11-23 12For WebId with a value, only data under such WebId will be returned.
When WebId is with empty string, all data of such system will be returned.
5-11 Get Game Hour Report(All Game Types)
API Name:SingleWallet/Report/GetGameHourReportAllGameType
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 0~20 | Y | Web ID (Letters and Numbers only) |
Hour | String | 13 | Y | Query Hour (yyyy-MM-dd HH) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/GameReport | Array | |
Data/GameReport/GameType | Int | Game Type (1. Slot Game 2. Fishing Slot) |
Data/GameReport/Currency | String | Currency Code (Refer to Table of Code) |
Data/GameReport/WebId | String | Web ID |
Data/GameReport/UserId | String | Only ID of a Player |
Data/GameReport/GameId | Int | Game Code (Refer to Table of Code) |
Data/GameReport/BetSum | Decimal | Bet (to hundredth) |
Data/GameReport/WinSum | Decimal | Points Won (to hundredth) |
Data/GameReport/JackpotWinSum | Decimal | Prize (to hundredth) |
Data/GameReport/NetWinSum | Decimal | Net Win/Loss Sum (to hundredth) |
Data/GameReport/RecordCount | Int | Record Count |
Data/GameReport/JackpotContributionSum | Decimal | Jackpot Contribution (Fifth Digit after Decimal Point) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3015 | Time is not in the allowed range. | Time not in allowed range |
Note:
When Query Hour is 2021-11-23 12, the acquired data range will be 2021-11-23 12:00:00 to 2021-11-23 12:59:59.
The range available for query is two hours prior to current time ,and the max. range available for query is 1440 hours (within 60 days). e.g. It’s now 2021-11-23 14:02, and the range available for query is 2021-09-24 14~ 2021-11-23 12
For WebId with a value, only data under such WebId will be returned.
When WebId is with empty string, all data of such system will be returned.
5-12 Get Game Daily Report
API Name:SingleWallet/Report/GetGameDailyReport
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 0~20 | Y | Web ID (Letters and Numbers only) |
GameType | Int | Y | Game Type (1. Slot Game 2. Fishing Slot) | |
Date | String | 10 | Y | Query Date (yyyy-MM-dd) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/GameReport | Array | |
Data/GameReport/Currency | String | Currency Code (Refer to Table of Code) |
Data/GameReport/WebId | String | Web ID |
Data/GameReport/UserId | String | Only ID of a Player |
Data/GameReport/GameId | Int | Game Code (Refer to Table of Code) |
Data/GameReport/BetSum | Decimal | Bet(to hundredth) |
Data/GameReport/WinSum | Decimal | Points Won(to hundredth) |
Data/GameReport/JackpotWinSum | Decimal | Prize (to hundredth) |
Data/GameReport/NetWinSum | Decimal | Net Win/Loss Sum (to hundredth) |
Data/GameReport/RecordCount | Int | Record Count |
Data/GameReport/JackpotContributionSum | Decimal | Jackpot Contribution (Fifth Digit after Decimal Point) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3015 | Time is not in the allowed range. | Time not in allowed range |
Note:
Where the query date is 2020-04-24, the range for the data acquired is 2020-04-24 12:00:00 to 2020-04-25 11:59:59.
The start date available for query is one day prior to the current date, and the max. period of query is within 60 days prior to the query date. e.g. It’s now 2020-04-24 10:30, and the start date available for query is 2020-04-22
For WebId with a value, only data under such WebId will be returned.
When WebId is with empty string, all data of such system will be returned.
5-13 Get Game Daily Report(All Game Types)
API Name:SingleWallet/Report/GetGameDailyReportAllGameType
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 0~20 | Y | Web ID(Letters and Numbers only) |
Date | String | 10 | Y | Query Date (yyyy-MM-dd) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/GameReport | Array | |
Data/GameReport/GameType | Int | Game Type (1. Slot Game 2. Fishing Slot) |
Data/GameReport/Currency | String | Currency Code (Refer to Table of Code) |
Data/GameReport/WebId | String | Web ID |
Data/GameReport/UserId | String | Only ID of a Player |
Data/GameReport/GameId | Int | Game Code (Refer to Table of Code) |
Data/GameReport/BetSum | Decimal | Bet (to hundredth) |
Data/GameReport/WinSum | Decimal | Points Won (to hundredth) |
Data/GameReport/JackpotWinSum | Decimal | Prize (to hundredth) |
Data/GameReport/NetWinSum | Decimal | Net Win/Loss Sum (to hundredth) |
Data/GameReport/RecordCount | Int | Record Count |
Data/GameReport/JackpotContributionSum | Decimal | Jackpot Contribution (Fifth Digit after Decimal Point) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3015 | Time is not in the allowed range. | Time not in allowed range |
5-14 Get Game History URL for Certain Account at Certain Minute
API Name:SingleWallet/Player/GetGameMinDetailURLToken
- Incoming Parameter Descriptions
Name | Type | ength | Required | description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code(Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID(Letters and Numbers only) |
UserId | String | 3~20 | Y | Only ID of a Player(Letters and Numbers only) |
Currency | String | 2~5 | Y | Currency Code (Refer to Table of Code) |
GameType | Int | Y | Game Type (1: Slot Game 2: Fishing Slot) | |
GameId | Int | Y | Game Code (Refer to Table of Code) | |
Time | String | 16 | Y | Query Time (yyyy-MM-dd HH:mm) |
Language | String | 5 | Y | Language Code (Refer to Table of Code) |
- Return Information Descriptions
Name | Type | description |
---|---|---|
Data | Object | |
Data/URL | String | URL for Viewing Game Record |
- Overview of Specific Return Error Codes
Error Code | Error Message | description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
5-15 Get Game History URL for Certain Account at Certain Minute ( By SequenNumber )
API Name:SingleWallet/Player/GetGameMinDetailURLTokenBySeq
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID (Letters and Numbers only) |
UserId | String | 3~20 | Y | Only ID of a Player (Letters and Numbers only) |
Currency | String | 2~5 | Y | Currency Code (Refer to Table of Code) |
GameType | Int | Y | Game Type (1: Slot Game 2: Fishing Slot) | |
GameId | Int | Y | Game Code (Refer to Table of Code) | |
SequenNumber | Long | Y | Record Number of Game Starting at Such Minute | |
Language | String | 5 | Y | Language Code (Refer to Table of Code) |
- Return Information Descriptions
Name | Type | description |
---|---|---|
Data | Object | |
Data/URL | String | URL for Viewing Game Record |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
Note:
The source of SequenNumber is 5-9, which is returned by the API to obtain statistics information per minute of the game.
Data/GameReport/SequenNumber The game record number starting from the minute
5-16 Get Game Record in Slot History of a Certain Account
API Name:SingleWallet/Player/GetSlotGameRecordURLToken
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code(Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID(Letters and Numbers only) |
UserId | String | 3~20 | Y | Only ID of a Player(Letters and Numbers only) |
Currency | String | 2~5 | Y | Currency Code (Refer to Table of Code) |
GameId | Int | Y | Game Code (Refer to Table of Code) | |
SequenNumber | Long | Y | Only Number of Game Record | |
Language | String | 5 | Y | Language Code (Refer to Table of Code) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/URL | String | URL for Viewing Game Record |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
5-17 Get Jackpot Records
API Name:SingleWallet/Jackpot/GetJackpotHitRec
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 0~20 | Y | Web ID (Letters and Numbers only) |
DateStart | String | 10 | Y | Start Date (yyyy-MM-dd) |
DateEnd | String | 10 | Y | End Date (yyyy-MM-dd) |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/JackpotHitRec | Array | |
Data/JackpotHitRec/JackpotHitID | Long | Only ID of Jackpot |
Data/JackpotHitRec/SequenNumber | Long | Only Number of Game Record |
Data/JackpotHitRec/Currency | String | Currency Code (Refer to Table of Code) |
Data/JackpotHitRec/WebId | String | Web ID |
Data/JackpotHitRec/UserId | String | Only ID of a Player |
Data/JackpotHitRec/GameId | Int | Game Code (Refer to Table of Code) |
Data/JackpotHitRec/JackpotType | Int | Jackpot Type (Refer to Note) |
Data/JackpotHitRec/JackpotWin | Decimal | Prize (to hundredth) |
Data/JackpotHitRec/HitTime | String | Hit Time |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3015 | Time is not in the allowed range. | Time not in allowed range |
Note:
When Query Date is 2021-11-22 ~ 2021-11-24, the acquired data range is 2021-11-22 12:00:00 to 2021-11-25 11:59:59.
The max. query range is within 60 days prior to current date. e.g. It’s now 2021-11-24 19:12:28, and the range available for query is 2021-09-25 ~ 2021-11-24
For WebId with a value, only data under such WebId will be returned.
When WebId is with empty string, all data of such system will be returned.
Forms of JackpotType
Jackpot Type | 0 | 1 | 2 | 3 |
Jackpot Name | GRAND | MAJOR | MINOR | MINI |
5-18 Get Value of Points Won under Specific Serial Number
API Name:SingleWallet/History/GetSeqResult
- Incoming Parameter Descriptions
Name | Type | Length | Required | Description |
---|---|---|---|---|
SystemCode | String | 2~20 | Y | System Code (Letters and Numbers only) |
WebId | String | 3~20 | Y | Web ID (Letters and Numbers only) |
UserId | String | 3~20 | Y | Only ID of a Player (Letters and Numbers only) |
Currency | String | 2~5 | Y | Currency Code (Refer to Table of Code) |
GameId | Int | Y | Game Code (Refer to Table of Code) | |
SequenNumber | Long | Y | Only Number of Game Record |
- Return Information Descriptions
Name | Type | Description |
---|---|---|
Data | Object | |
Data/SequenNumber | Long | Only Number of Game Record |
Data/Amount | Decimal | Amount of Points Won (to hundredth) |
- Overview of Specific Return Error Codes
Error Code | Error Message | Description |
---|---|---|
3011 | Deny permission for system. | SI Permission Insufficient |
3017 | Game result is not found. | Game Result Not Found |
Note:
The range available for query is three minutes prior to the current time, and the
max. range is 72 hours prior to current time.
e.g. It’s now 2021-04-24 16:30, the only available range of query will be 2020-04-24 16:26 ~ 2020-04-21 16:31
6. Merchants are Required to Provide the Following APIs to the RSG Gaming Platform
Merchants shall comply with the specifications as follows in the designing of provided API:
Apply same data transmission and decryption method as game system API. Refer to 3.API USE DESCRIPTIONS and 4. API Request, Header and Return Information Descriptions
Apply the following Error Code specifications for return results after API execution
(1) The following Error Codes are shared by all APIs
Error Code Error Message Description 0 OK Normal 1001 Execute failed. Execution failed 1002 System is in maintenance. System in maintenance 2001 Illegal arguments. Invalid parameter 2002 Invalid decrypt. Decryption failed (2) Specific Return Error Code for Each API ( See Each API for details )
Error Code Error Message Description 4001 The player's currency doesn't exist. This player account does not exist 4002 Duplicate SequenNumber. Duplicate SequenNumber 4003 Balance is not enough. Balance Insufficient 4004 The SequenNumber doesn't exist. This SequenNumber does not exist 4005 This SequenNumber has been settled. This SequenNumber has been settled 4006 This SequenNumber has been cancelled. This SequenNumber has been cancelled 4007 Duplicate TransactionId. Duplicate TransactionId 4008 Deny prepay, other reasons. Deny prepay, other reasons 4009 Transaction is not found. Transaction is not found {{url}}:API link for RSG Gaming Platform Calls provided by the merchant
Based on SPIN status in game, this game system will apply different subgame
code (Refer to Table of Code). When calling API provided by the merchant, the only
exception will be the subgame name of Jackpot, which exclusively applies
JackpotResult (6-4); for other sub games, the Bet (6-2) and
BetResult (6-3) will be applied in pair.The Amount parameter of Bet (6-2) API contains bets greater than 0 only when
the name corresponding to Subgame Code (Refer to Table of Code) being “Basic” or
“Normal” (e.g. Subgame Code is 0 or 3000) , bets under other subgame codes will carry
a 0.SequenNumber is the Only Number of Game Record (hereinafter Seq) (1) Seq will appear in pairs at Bet and settlement API
(2) Seq will appear individually when hitting JackpotFAQ
The operator replied that the RSG response body DOES NOT need to include Msg=.
❌ The response body includes Msg=
Msg=xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
✅ The response body DOES NOT include Msg=
xkf7wEkQvp+LJTravXHY9RDEX24YMjQxnV/5DPCoIKE=
6-1 Obtain Balance
API Name:{{url}}/GetBalance
Incoming Parameter Descriptions
Name Type Length Required Description SystemCode String 2~20 Y System Code (Letters and Numbers only) WebId String 3~20 Y Web ID (Letters and Numbers only) UserId String 3~20 Y Only ID of a Player (Letters and Numbers only) Currency String 2~5 Y Currency Code (Refer to Table of Code) Return Information Descriptions
Name Type Description Data Object Data/Balance Decimal Current Member Balance (to hundredth) (Range 0.00~9999999999.99) Overview of Specific Return Error Codes
Error Code Error Message Description 4001 The player's currency doesn't exist. This player account does not exist
6-2 Bet
API Name:{{url}}/Bet
Incoming Parameter Descriptions
Name Type Length Required Description SystemCode String 2~20 Y System Code (Letters and Numbers only) WebId String 3~20 Y Web ID (Letters and Numbers only) UserId String 3~20 Y Only ID of a Player (Letters and Numbers only) TransactionID String 23 Y Only ID of a Transaction (Letters and Numbers only) Currency String 2~5 Y Currency Code (Refer to Table of Code) GameId Int Y Game Code (Refer to Table of Code) SubGameType Int Y Subgame Code (Refer to Table of Code) SequenNumber Long Y Only Number of Game Record Amount Decimal Y Bet Amount (to hundredth) (Range 0.00~9999999999.99) Return Information Descriptions
Name Type Description Data Object Data/Balance Decimal Member Balance after Bet (to hundredth) (Range 0.00~9999999999.99) Overview of Specific Return Error Codes
Error Code Error Message Description 4001 The player's currency doesn't exist. This player account does not exist 4002 Duplicate SequenNumber. Duplicate SequenNumber 4003 Balance is not enough. Balance Insufficient
6-3 Settle
API Name:{{url}}/BetResult
Incoming Parameter Descriptions
Name Type Length Required Description SystemCode String 2~20 Y System Code (Letters and Numbers only) WebId String 3~20 Y Web ID (Letters and Numbers only) UserId String 3~20 Y Only ID of a Player (Letters and Numbers only) TransactionID String 23 Y Only ID of a Transaction (Letters and Numbers only) Currency String 2~5 Y Currency Code (Refer to Table of Code) GameId Int Y Game Code (Refer to Table of Code) SubGameType Int Y Subgame Code (Refer to Table of Code) SequenNumber Long Y Only Number of Game Record Amount Decimal Y Amount of Points Won (to hundredth) (Range 0.00~9999999999.99) PlayTime String 19 Y Play Time (yyyy-MM-dd HH:mm:ss) Return Information Descriptions
Name Type Description Data Object Data/Balance Decimal Member Balance after Bet (to hundredth) (Range 0.00~9999999999.99) - Overview of Specific Return Error Codes
Error Code Error Message Description 4001 The player's currency doesn't exist. This player account does not exist 4004 The SequenNumber doesn't exist. This SequenNumber does not exist 4005 This SequenNumber has been settled. This SequenNumber has been settled
6-4 Hitting Jackpot
API Name:{{url}}/JackpotResult
Incoming Parameter Descriptions
Name Type Length Required Description SystemCode String 2~20 Y System Code (Letters and Numbers only) WebId String 3~20 Y Web ID (Letters and Numbers only) UserId String 3~20 Y Only ID of a Player (Letters and Numbers only) TransactionID String 23 Y Only ID of a Transaction (Letters and Numbers only) Currency String 2~5 Y Currency Code (Refer to Table of Code) GameId Int Y Game Code (Refer to Table of Code) SubGameType Int Y Subgame Code (Refer to Table of Code) SequenNumber Long Y Only Number of Game Record Amount Decimal Y Amount of Points Won (to hundredth) (Range 0.00~9999999999.99) PlayTime String 19 Y Play Time (yyyy-MM-dd HH:mm:ss) Return Information Descriptions
Name Type Description Data Object Data/Balance Decimal Member Balance after Points Won (to hundredth) (Range 0.00~9999999999.99) Overview of Specific Return Error Codes
Error Code Error Message Error Message 4001 The player's currency doesn't exist. This player account does not exist 4005 This SequenNumber has been settled. This SequenNumber has been settled
6-5 Cancel Bet
API Name:{{url}}/CancelBet
Incoming Parameter Descriptions
Name Type Length Required Description SystemCode String 2~20 Y System Code (Letters and Numbers only) WebId String 3~20 Y Web ID (Letters and Numbers only) UserId String 3~20 Y Only ID of a Player (Letters and Numbers only) TransactionID String 23 Y Only ID of a Transaction (Letters and Numbers only) SequenNumber Long Y Only Number of Game Record Return Information Descriptions
Name Type Description Data Object Data/Balance Decimal Member Balance after Cancel Bet (to hundredth) (Range 0.00~9999999999.99) Overview of Specific Return Error Codes
Error Code Error Message Description 4004 The SequenNumber doesn't exist. This SequenNumber does not exist 4006 This SequenNumber has been cancelled. This SequenNumber has been cancelled
Description of Fishing Machine Game Prepay API
Sections 6-6 Prepay, 6-7 Refund, and 6-8 Check Transaction will involve related API
actions for the supported fish games:
Game Id | Gane Name |
---|---|
3001 | Ocean Emperor |
3002 | FuWa Fishing |
RSG will prepay a certain amount to the platform. The rules for this are defined by each fish game room level. However,
if the player's balance is insufficient to prepay the amount for that room level, the entire balance of the player will be prepaid.
- Example 1: The required amount is 27,000, but the player’s balance is only 13,000. In this case, 13,000 will be prepaid, leaving the player’s balance with the platform at 0.
- Example 2: The required amount is 27,000, but the player’s balance is 50,000. In this case, 27,000 will be prepaid, leaving the player’s balance with the platform at 23,000.
Players will prepay to platform separately for each fish game. However, the total amount prepaid for the two games will be aggregated within RSG.
- Example 1: Logging into Ocean Emperor - Newbie results in a prepay of 18,000. Immediately playing Fuwa Fishing - Newbie after logging out requires 2,700. Since the internal balance in RSG is already 18,000, the 2,700 prepay requirement is satisfied, and no further prepay to the platform is needed.
- Example 2: Logging into FuWa Fishing - Newbie results in a prepay of 2,700. Immediately playing Ocean Emperor - Newbie after logging out requires 18,000, resulting in an additional prepay of 15,300 (18,000 - 2,700) to the platform. If the player's balance is insufficient to cover the 15,300, the player's current balance will be prepaid.
Once a player prepays an amount into RSG, and starts shooting, the RSG internal wallet will be used for bet. When the balance reaches 0, the game must be reloaded to prepay the required amount from the platform again.
Additionally, after prepaying, switching room level will not result in another prepay to the platform. The player must log out and process a refund before being able to prepay again.
When a player logs in, if the first attempt to prepay to the platform fails, the 6-8 Check transaction API will be used to query the platform if the prepay transaction exists. If the prepay transaction exists, the player will be allowed to continue logging into the game. If it does not exist, the player's connection will be terminated.
Description of Prepayment
Ocean Emperor ( 3001) prepay amount: The maximum bet of the room level x 1800. Examples:
Room Level | Currency | Max Bet Level | Prepay Amount |
---|---|---|---|
Newbie | NT | 10 | 18,000 |
Expert | NT | 100 | 180,000 |
Emperor | NT | 1000 | 1,800,000 |
Newbie | RMB | 3 | 5,400 |
Expert | JPY | 400 | 720,000 |
Emperor | MYR | 200 | 360,000 |
FuWa Fishing ( 3002 ) prepay amount: The maximum bet of the room level x 2700. Examples:
Room Level | Currency | Max Bet Level | Prepay Amount |
---|---|---|---|
Newbie | NT | 1 | 2,700 |
Expert | NT | 10 | 27,000 |
Supreme | NT | 100 | 270,000 |
Newbie | RMB | 0.3 | 810 |
Expert | JPY | 40 | 108,000 |
Supreme | MYR | 20 | 54,000 |
Sequence diagram of prepay successful
Sequence diagram of prepay failed
Sequence diagram of refund successful
Sequence diagram of refund failed
RSG may prepay to the platform multiple times as the player enters and exits different fish games, but there will only be a refund action after logging out in one minute. During multiple prepay and refund actions, the SessionId parameter will be included in the Prepay and Refund API requests as a unique identifier for the same transaction process.
Sequence diagram of transaction session
6-6 Prepay
API Name:{{url}}/Prepay
Incoming Parameter Descriptions
Name Type Length Required Description SystemCode String 2~20 Y System Code (Letters and Numbers only) WebId String 3~20 Y Web ID (Letters and Numbers only) UserId String 3~20 Y Only ID of a Player (Letters and Numbers only) GameId Int Y Game Code (3001 and 3002 only) Currency String 2~5 Y Currency Code (Refer to Table of Code) TransactionId String 8~30 Y Only ID of a Transaction (Letters and Numbers and @ only) SessionId String 36 Y Same Transaction Process Identifier Amount Decimal Y Amount of Pre Pay (to hundredth) (Range 0.00~9999999999.99) Return Information Descriptions
Name Type Description Data Object Data/Balance Decimal Member Balance after Pre Pay (to hundredth) (Range 0.00~9999999999.99) Data/Amount Decimal Amount of Pre Pay (to hundredth) (Range 0.00~9999999999.99) Overview of Specific Return Error Codes
Error Code Error Message Description 4001 The player's currency doesn't exist. This player account does not exist 4003 Balance is not enough. Balance Insufficient 4007 Duplicate TransactionId. Duplicate TransactionId 4008 Deny prepay, other reasons. Deny prepay, other reasons
6-7 Refund
API Name:{{url}}/Refund
Incoming Parameter Descriptions
Name Type Length Required Description SystemCode String 2~20 Y System Code (Letters and Numbers only) WebId String 3~20 Y Web ID (Letters and Numbers only) UserId String 3~20 Y Only ID of a Player (Letters and Numbers only) GameId Int Y Game Code (3001 and 3002 only) Currency String 2~5 Y Currency Code (Refer to Table of Code) TransactionId String 8~30 Y Only ID of a Transaction (Letters and Numbers and @ only) SessionId String 36 Y Same Transaction Process Identifier Amount Decimal Y Amount of Refund (to hundredth) (Range 0.00~9999999999.99) Return Information Descriptions
Name Type Description Data Object Data/Balance Decimal Member Balance after Refund (to hundredth) (Range 0.00~9999999999.99) Data/Amount Decimal Amount of Refund (to hundredth) (Range 0.00~9999999999.99) Overview of Specific Return Error Codes
Error Code Error Message Description 4001 The player's currency doesn't exist. This player account does not exist 4007 Duplicate TransactionId. Duplicate TransactionId
6-8 CheckTransaction
API Name:{{url}}/CheckTransaction
Incoming Parameter Descriptions
Name Type Length Required Description SystemCode String 2~20 Y System Code (Letters and Numbers only) WebId String 3~20 Y Web ID (Letters and Numbers only) UserId String 3~20 Y Only ID of a Player (Letters and Numbers only) GameId Int Y Game Code (3001 and 3002 only) Currency String 2~5 Y Currency Code (Refer to Table of Code) TransactionId String 8~30 Y Only ID of a Transaction (Letters and Numbers and @ only) Return Information Descriptions
Name Type Description Data Object Data/TransactionId String Only ID of a Transaction (Letters and Numbers and @ only) Data/TransactionTime String yyyy-MM-dd HH:mm:ss Data/WebId String Web ID (Letters and Numbers only) Data/UserId String Only ID of a Player (Letters and Numbers only) Data/GameId Int Game Code (3001 and 3002 only) Data/Currency String Currency Code (Refer to Table of Code) Data/Action Int 1 = Pre Pay, 2 = Refund Data/Amount Decimal Amount of transaction (to hundredth) (Range 0.00~9999999999.99) Data/AfterBalance Decimal Member Balance after transaction (to hundredth) (Range 0.00~9999999999.99) Overview of Specific Return Error Codes
Error Code Error Message Description 4001 The player's currency doesn't exist. This player account does not exist 4009 Transaction is not found. Transaction is not found
7. FTP Function
7-1 About Functions
FTP Method shall provide the three types of data as follows
Detailed Game Transaction Information
Game Stats by Minutes
Game Stats by Day
7-2 About Directory
The directory in FTP will be sorted by Data Category and Game Category at first level, followed by sorting by date at second level, e.g.:20200325, 20200326, Game Stats by Day does not contain a sub level of directory.
Directory Example:
Detailed Game Transaction Information:history_fish / 20200325
Game Stats by Minutes:report_min_slot / 20200326
Game Stats by Day:report_daily
7-3 About Name of Compressed Folder
The name to compressed folders of Detailed Game Transaction Information and Game Stats by Minutes is composed of Data Category, Game Category, System Code, Start Time, End Time
Folder Name Example:
report_min_slot_TestSystem_202003251710_202003251719.zip
The data time range contained in this compressed folder : 2020-03-25 17:10:00 ~ 17:19:59, in which contains files from within a max. range of 10 minutes
The name to compressed folders of Daily Stats Information is composed of Data Category, System Code and Date
Folder Name Example:
report_daily_TestSystem_20200325.zip
7-4 About File Name
The name to Detailed Game Transaction Information and Game Stats by Minutes
files in .csv format will be in order of Data Category, Game Category, System Code, Web ID, Per Minute
File Name Example:
report_min_slot_TestSystem_web4_20200325_1712.csv
Such csv file contains data within time range of:2020-03-25 17:12:00 ~ 17:12:59
File name of Daily Stats Information
The file will be named with components in order of Data Category, Game Category, System Code, Web ID, Date
Folder Name Example :
report_min_slot_TestSystem_web4_20200325.csv
7-5 About Fields
Detailed Game Transaction Information: Refer to 5-8 Get Game Details
Game Stats by Minutes: Refer to 5-9 Get Game Minute Report
Game Daily Stats Information: Refer to 5-12 Get Game Daily Report
8. API Get Details and Record URL
8-1 Slot Game
5-8 Get Game Details ( SingleWallet/History/GetGameDetail )
5-16 Get Game Record in Slot History of a Certain Account ( SingleWallet/Player/GetSlotGameRecordURLToken )
8-2 Fishing Slot
Due to greater volume of data from fishing slot, following with the contents below is suggested
5-9 Get Game Minute Report (SingleWallet/Report/GetGameMinReport )
Get Game History URL for Certain Account at Certain Minute(s)
a. Parameter being "Minute" 5-14 (SingleWallet/Player/GetGameMinDetailURLToken)
b. Parameter being "Seq" 5-15 (SingleWallet/Player/GetGameMinDetailURLTokenBySeq)
The above (1) is the compilation of fishing slot by minutes, and (2) is the link to Per Minute list of details (apply either a or b) Seq refers to the first SequenNumber of such minute
9. Error Code
9-1 Table of Error Codes
Code Category | Description |
---|---|
0 | Normal |
1xxx | System error or under maintenance |
2xxx | Error in Parameter Input Verification |
3xxx | Logic Error After Identification |
Error Code | Error Message | Description |
---|---|---|
0 | OK | Normal |
1001 | Execute failed. | Execution failed |
1002 | System is in maintenance. | System in maintenance |
2001 | Illegal arguments. | Invalid Parameters |
2002 | Invalid decrypt. | Decryption Failed |
3005 | Balance is not enough. | Balance Insufficient |
3006 | Transaction is not found. | Transaction Results Not Found |
3008 | The player's currency doesn't exist. | This player account does not exist |
3010 | The player's currency already exists | This player account has already existed |
3011 | Deny permission for system. | SI Permission Insufficient |
3012 | Deny permission for game. | Game permission insufficient |
3014 | Duplicate TransactionID. | Duplicate TransactionID |
3015 | Time is not in the allowed range. | Time not in allowed range |
3016 | Deny withdraw, player is in gaming. | Point Withdrawal Denied. Player in game. |
3017 | Game result is not found. | Game result is not found. |
3018 | This currency is not allowed. | This currency is not allowed. |
9-2 3 Circumstances Resulting in Error Code 2002:
Encrypt Error
Failure to send body by Msg=xxxxx method upon data POST
Time error in X-API-Timestamp, which the incoming Timestamp exceeds the current calls with more than 30 seconds
9-3 Frequently Seen Circumstances Resulting in Error Code 2001:
Quotation marks for Value Type ( Int, Long, Decimal ) Parameters shall be removed upon sending
Incorrect => {"GameId": "36"}, Correct => {"GameId": 36}
Time parameter. Take extra care to Length and description of API parameter. There are a total of three types of parameters as follows
yyyy-MM-dd HH:mm
yyyy-MM-dd HH
yyyy-MM-dd
Appendix A - Game Codes
Version: v1.16.0
1. Game Codes
1-1 Descriptions
These game codes are for game interfacing, and for identification use after obtaining historical records.
Currently, 85 slot games , 2 fishing games and 1 Arcade game are available. In the game screen, "Happy Farm" and "Power of Thor" supports vertical and horizontal styles,
"Rich Mahjong", "Rich Mahjong 2", "Caishen Fortunes", "Dragon Legend", "Luchadors" , "Caishen Coming" , "Fortune Gems 4" , "Super Ace 2" , "Fortune of Aztecs" , "Lucky Dog" , "Night Market 3" and "Chinese New Year 3" only supports vertical styles,
and the others only support horizontal styles.
1-2 Slot Game Codes( only in horizontal)
Code | en-US | zh-TW | zh-CN | Last Added |
---|---|---|---|---|
1 | Fortune Thai | 泰有錢 | 泰有钱 | |
2 | Magic Gem | 魔法石 | 魔法石 | |
3 | Royal 777 | 皇家 777 | 皇家 777 | |
4 | Love City | 慾望城市 | 欲望城市 | |
5 | Gold Chicken | 金鷄報喜 | 金鸡报喜 | |
6 | Pharaoh | 法老王 | 法老王 | |
7 | Alibaba | 阿里巴巴 | 阿里巴巴 | |
8 | Lucky Fruits | 幸運水果 | 幸运水果 | |
10 | Jungle | 動物叢林 | 动物丛林 | |
11 | Captain Hook | 虎克船長 | 虎克船长 | |
12 | HUCA | 野蠻遊戲 | 野蛮游戏 | |
14 | Sweet Candy | 甜蜜糖果 | 甜蜜糖果 | |
15 | Fire Spin | 烈焰轉輪 | 烈焰转轮 | |
16 | Popeye | 大力水手 | 大力水手 | |
17 | Crazy Doctor | 瘋狂博士 | 疯狂博士 | |
18 | Nonstop | 永不停止 | 永不停止 | |
19 | 5 Dragons | 五龍爭霸 | 五龙争霸 | |
21 | 72 Changes | 七十二變 | 七十二变 | |
23 | Mermaid | 人魚傳說 | 人鱼传说 | |
24 | Buffalo | 荒野水牛 | 荒野水牛 | |
25 | Wild Panda | 竹林熊貓 | 竹林熊猫 | |
26 | Lucky Thailand | 泰好運 | 泰好运 | |
27 | God of Wealth | 財神到 | 财神到 | |
28 | Lucky Dragon | 行運一條龍 | 行运一条龙 | |
29 | HUSA | HUSA | HUSA | |
30 | Dragon King | 龍王 | 龙王 | |
31 | TiKi Party | 提金派對 | 提金派对 | |
32 | Goblin Miner | 礦工哥布林 | 矿工哥布林 | |
33 | Lucky Bar | 幸運拉霸 | 幸运拉霸 | |
34 | Africa | 非洲 | 非洲 | |
35 | Wizard Store | 巫師商店 | 巫师商店 | |
36 | Mr.Doggy | 家犬先生 | 家犬先生 | |
37 | Disco Night | 迪斯可之夜 | 迪斯可之夜 | |
38 | Horror Nights | 農場夜驚魂 | 农场夜惊魂 | |
39 | China Empress | 武媚娘 | 武媚娘 | |
40 | FuWaFaFa | 福娃發發 | 福娃发发 | |
41 | Tarzan | 泰山 | 泰山 | |
42 | Jalapeno | 墨西哥辣椒 | 墨西哥辣椒 | |
43 | Piggy Punch | 金豬爆吉 | 金猪爆吉 | |
44 | Sevens High | 七起來 | 七起来 | |
45 | Kunoichi | 女忍者 | 女忍者 | |
46 | Ninja | 忍者 | 忍者 | |
47 | Jelly 27 | 果凍 27 | 果冻 27 | |
48 | Angry Bear | 暴怒棕熊 | 暴怒棕熊 | |
49 | Poseidon | 海神 | 海神 | |
50 | Dancing Lion | 跳跳獅 | 跳跳狮 | |
51 | Medusa | 美杜莎 | 美杜莎 | |
52 | Medea | 美狄亞 | 美狄亚 | |
53 | Neon Circle | 霓虹圓 | 霓虹圆 | |
55 | Get High | 嗨起來 | 嗨起来 | |
56 | Cowboy | 西部牛仔 | 西部牛仔 | |
58 | The Little Match Girl | 賣火柴的小女孩 | 卖火柴的小女孩 | |
59 | Mystery Panda | 秘林熊貓 | 秘林熊猫 | |
60 | Hip Hop Monkey | 嘻哈金剛 | 嘻哈金刚 | |
61 | Book of Gold | 黃金之書 | 黄金之书 | |
65 | Tai Chi | 太極 | 太极 | |
66 | Golden Leaf Clover | 金色幸運草 | 金色幸运草 | |
68 | Wizard Store Gold | 巫師商店黃金版 | 巫师商店黄金版 | |
70 | Rat's Money | 鼠來寶 | 鼠来宝 | |
72 | Songkran | 潑水節 | 泼水节 | |
73 | Elf Archer | 精靈射手 | 精灵射手 | |
76 | Bear Kingdom | 小熊王國 | 小熊王国 | |
78 | Royal 7777 | 皇家 7777 | 皇家 7777 | |
81 | Dragon King2 | 龍王 2 | 龙王 2 | |
82 | Pharaoh II | 法老王 II | 法老王 II | |
90 | Dragon Fight | 龍行天下 | 龙行天下 | |
100 | Roma | 羅馬競技場 | 罗马竞技场 | |
113 | Chin Shi Huang | 秦皇傳說 | 秦皇传说 | |
121 | Legend of Lu Bu | 戰神呂布 | 战神吕布 | |
123 | Jurassic Treasure | 侏羅紀寶藏 | 侏罗纪宝藏 | 2024.11 |
2001 | Energy Combo | 能量外星人 | 能量外星人 |
1-3 Slot Game Codes(only in vertical)
Code | en-US | zh-TW | zh-CN | Last Added |
---|---|---|---|---|
117 | Rich Mahjong | 麻將發了 | 麻将发了 | |
114 | Caishen Fortunes | 聚寶財神 | 聚宝财神 | |
119 | Dragon Legend | 魔龍傳奇 | 魔龙传奇 | |
75 | Luchadors | 黃金摔角手 | 黄金摔角手 | 2024.01 |
120 | Caishen Coming | 有請財神 | 有请财神 | 2024.01 |
125 | Fortune Gems 4 | 迦羅寶石4 | 迦罗宝石4 | 2024.11 |
128 | Super Ace 2 | 超級王牌2 | 超级王牌2 | 2024.11 |
116 | Fortune of Aztecs | 勇闖黃金城 | 勇闯黄金城 | 2024.11 |
118 | Rich Mahjong 2 | 麻將發了2 | 麻将发了2 | 2024.11 |
122 | Lucky Dog | 狗來富 | 狗来富 | 2024.11 |
126 | Night Market 3 | 逛夜市3 | 逛夜市3 | 2024.12 |
127 | Chinese New Year 3 | 大過年3 | 大过年3 | 2024.12 |
1-4 Slot Game Codes(Both vertical and horizontal)
Code | en-US | zh-TW | zh-CN | Last Added |
---|---|---|---|---|
111 | Happy Farm | 開心農場 | 开心农场 | |
112 | Power of Thor | 雷神之錘 | 雷神之锤 |
1-5 Fishing Game Codes( game screen horizontal only)
Code | en-US | zh-TW | zh-CN | Last Added |
---|---|---|---|---|
3001 | Ocean Emperor | 八爪天下海霸王 | 八爪天下海霸王 | |
3002 | FuWa Fishing | 福娃捕魚 | 福娃捕鱼 |
1-6 Arcade Game Codes( game screen horizontal only)
Code | en-US | zh-TW | zh-CN | Last Added |
---|---|---|---|---|
5001 | Crown 5PK | 皇冠5PK | 皇冠5PK | 2024.11 |
2. Subgame Codes
2-1 Descriptions
Codes are for identification use after obtaining historical records
2-2 Slot Subgame Codes
Code | Subgame Name | Last Added |
---|---|---|
0 | Basic (Spin) | |
1 | Free | |
2 | Gamble | |
3 | Jackpot | |
4 | Respin | |
5 | Select | |
6 | Link | |
7 | Cascading | |
99 | Feature |
2-3 Fishing Subgame Codes
Code | Subgame Name | Last Added |
---|---|---|
3000 | Normal ( Shooting ) | |
3001 | Dragon Cannon | |
3002 | Cannon back ( Dragon ) | |
3003 | Gold Ingot | |
3004 | Mega Drill | |
3005 | Cannon back ( Mega Drill ) | |
99 | Feature | |
100 | Jackpot |
Appendix B - Currency Codes
Version: v1.4.0
Code | Currency Name | Rate Remarks | Last Added |
---|---|---|---|
NT | New Taiwan Dollars | ||
HK | Hong Kong Dollars | ||
IDR | Indonesian Rupiah | 1 : 1000 | |
JPY | Japanese Yen | ||
KRW | Korean Won | ||
MYR | Malaysian Ringgit | ||
RMB | Renminbi (Chinese Yuan) | ||
SGD | Singapore Dolla | ||
THB | Thai Baht | ||
USA | United States Dollars | ||
MMK | Myanmar Kyat | ||
VND | Vietnamese Dong | 1 : 1000 | |
INR | Indian Rupee | ||
PHP | Philippine Peso | ||
EUR | Euro | ||
GBP | British Pound | ||
USDT | Tether | ||
MYR2 | Malaysian Ringgit 100 | 1 : 0.01 | |
RSG01 | New Taiwan Dollars 100 | 1 : 0.01 | |
RSG02 | New Taiwan Dollars 130 | 1 : 1/130 | |
AUD | Australian Dollar | 2024.08 | |
BRL | Brazilian Real | 2024.08 | |
LAK | Lao Kip | 1 : 1000 | 2024.08 |
NGN | Nigerian Naira | 2024.08 | |
PKR | Pakistani Rupee | 2024.08 | |
ZAR | South African Rand | 2024.08 | |
MXN | Mexican Peso | 2024.08 | |
USDK | United States Dollars 1000 | 1 : 0.001 | 2024.08 |
BDT | Bangladeshi Taka | 2024.08 | |
JPY2 | Japanese Yen 130 | 1 : 1/130 | 2025.03 |
VNDO | Vietnamese Dong (Original) | 2025.03 | |
RSG03 | Thai Baht 5000 | 1 : 1/5000 | 2025.03 |
LAKO | Lao Kip (Original) | 2025.03 |
Appendix C - Language Codes
Version: v1.1.0
Code | Language Name | Last Added |
---|---|---|
en-US | English | |
zh-TW | Traditional Chinese | |
zh-CN | Simplified Chinese | |
th-TH | Thai | |
ko-KR | Korean | |
ja-JP | Japanese | |
en-MY | Burmese | |
id-ID | Bahasa Indonesia | |
vi-VN | Vietnamese | 2021.11 |
Appendix D - Release Notes
1.9.0
- Adding 4 currencies
- Japanese Yen 130
- Vietnamese Dong (Original)
- Thai Baht 5000
- Lao Kip (Original)
1.8.0
- Power of Thor supports both vertical and horizontal.
1.7.0
- Adding 2 games
- Slot game
1.6.0
- Adding 5 games
- Slot game
- Arcade game
1.5.0
- Adding 2 games
1.4.0
- Adding FAQ in section 3-2 Send Request
- Adding FAQ in section 6. Merchants are Required to Provide the Following APIs to the RSG Gaming Platform
- Adding back to index url.
1.3.0
- Convert the API documentation from the PDF file to a web site. This version serves as the initial web-based release.
1.2.0
Fixing the 3-5 PHP code MD5 example.
Add parameter to API:
- 5-4 Retrieve game lobby URL (enter game lobby) -
SingleWallet/Player/GetLobbyURLToken
Add a new URL parameter when exiting:ExitAction
. This parameter is optional and does not need to be required passed.
- 5-4 Retrieve game lobby URL (enter game lobby) -
Add ErrorCode = 3018, indicating that this currency is not allowed. The APIs that will return this error are as follows: