Skip to content

Seamless Wallet API ​

TIP

Seamless Wallet integration allows the operator and QK Gaming to exchange information in order to manage player account balances and transactions.

⚠️ Scope

This document only applies to operators whose agent wallet mode is set to "Seamless Wallet". If the agent is in "Transfer Wallet" mode, QK Gaming deposits the balance into its internal wallet via the money parameter on the Game Login Interface, and the operator does not need to implement the interfaces in this document.

🏗️ Integration Notes ​

⚠️ Important

  • The operator needs to provide the platform with the callback method URL and the API IP whitelist
  • The operator needs to add the platform's Seamless Wallet server IP address to its own whitelist
  • After integrating interfaces 1002, 1003, and 1005, the operator should perform reverse testing and add safeguards against abnormal states

Request Basics ​

  • Endpoint: {host}/seamlesswallet
  • HTTP Method: GET

🔐 Authentication & Encryption ​

All interfaces require authentication and encryption. For details on the encryption method, see: Authentication Guide

Request Parameter Format ​

ParameterTypeRequiredDescription
agentString✅Agent ID (provided by the platform)
timestampString✅Unix timestamp (milliseconds)
paramString✅Encrypted parameter string, encrypted using AESEncrypt(param, DESKey)
keyString✅MD5 checksum string, generated using MD5(agent+timestamp+MD5Key)

📋 Interface List ​

Query Balance Interface (s:1001) ​

param Structure ​

ParameterTypeRequiredDescription
sInteger✅Operation subtype (fixed at 1001)
accountString✅Player account
currencyString✅Currency code

Response Parameters ​

ParameterTypeDescription
mStringPrimary operation type
sIntegerOperation subtype (1001 = query balance interface)
dObjectData object
d.codeIntegerResponse code
d.accountStringPlayer account
d.moneyNumberAccount balance

Response example

json
{
  "m": "/seamlesswallet",
  "s": 1001,
  "d": {
    "code": 0,
    "account": "player001",
    "money": 1000.50
  }
}

Place Bet Interface (s:1002) ​

param Structure ​

ParameterTypeRequiredDescription
sInteger✅Operation subtype (fixed at 1002)
accountString✅Player account
orderIdString✅Order ID
gameNoString✅Game round ID
kindIdInteger✅Game type ID (see Game List)
moneyNumber✅Bet amount
currencyString✅Currency code
roomModeString✅Game mode

Response Parameters ​

ParameterTypeDescription
mStringPrimary operation type
sIntegerOperation subtype (1002 = place bet interface)
dObjectData object
d.codeIntegerResponse code
d.accountStringPlayer account
d.moneyNumberBalance after the bet

Response example

json
{
  "m": "/seamlesswallet",
  "s": 1002,
  "d": {
    "code": 0,
    "account": "player001",
    "money": 950.50
  }
}

Return Balance Interface (s:1003) ​

param Structure ​

ParameterTypeRequiredDescription
sInteger✅Operation subtype (fixed at 1003)
accountString✅Player account
orderIdString✅Order ID
gameNoString✅Game round ID
kindIdInteger✅Game type ID (see Game List)
moneyNumber✅Return amount
currencyString✅Currency code
roomModeString✅Game mode
betCountInteger✅Total number of successful bets
totalBetNumber✅Bet amount
validBetNumber✅Valid bet amount
totalWithdrawNumber✅Game win/loss amount
revenueNumber✅Rake amount

Response Parameters ​

ParameterTypeDescription
mStringPrimary operation type
sIntegerOperation subtype (1003 = return balance interface)
dObjectData object
d.codeIntegerResponse code
d.accountStringPlayer account
d.moneyNumberBalance after the return

Response example

json
{
  "m": "/seamlesswallet",
  "s": 1003,
  "d": {
    "code": 0,
    "account": "player001",
    "money": 1150.50
  }
}

Query Order Interface (s:1004) ​

param Structure ​

ParameterTypeRequiredDescription
sInteger✅Operation subtype (fixed at 1004)
accountString✅Player account
orderIdString✅Order ID
gameNoString✅Round ID
kindIdInteger✅Game type ID (see Game List)

Response Parameters ​

ParameterTypeDescription
mStringPrimary operation type
sIntegerOperation subtype (1004 = query order interface)
dObjectData object
d.codeIntegerResponse code
d.statusIntegerTransaction order status code

Response example

json
{
  "m": "/seamlesswallet",
  "s": 1004,
  "d": {
    "code": 0,
    "status": 1
  }
}

Cancel Bet Interface (s:1005) ​

param Structure ​

ParameterTypeRequiredDescription
sInteger✅Operation subtype (fixed at 1005)
accountString✅Player account
moneyNumber✅Amount to cancel
orderIdString✅Order ID
kindIdInteger✅Game type ID (see Game List)
gameNoString✅Game round ID
currencyString✅Currency code

Response Parameters ​

ParameterTypeDescription
mStringPrimary operation type
sIntegerOperation subtype (1005 = cancel bet interface)
dObjectData object
d.codeIntegerResponse code
d.statusIntegerCancellation status code

Response example

json
{
  "m": "/seamlesswallet",
  "s": 1005,
  "d": {
    "code": 0,
    "status": 1
  }
}

❌ Failure Response Example ​

json
{
  "m": "/seamlesswallet",
  "s": 1001,
  "d": {
    "code": 3,
    "msg": "Under maintenance"
  }
}

📌 Code Reference ​

📘 Response Code Reference ​

CodeDescription
0Success
1Insufficient balance
2Member account does not exist
3Under maintenance
4Token verification error
5Invalid data format
6Decryption error
7MD5 error
8Unknown operation subtype
9Duplicate order ID
10Agent does not exist
11Account is being deposited/withdrawn
12Order not found
13Server error
32Failed to retrieve player information

📦 Transaction Order Status Codes ​

CodeDescription
1Success
2Failed
3Processing
4Order not found
5Other error

⚠️ Cancellation Status Code Reference ​

CodeDescription
1Success
2Failed

🃏 Game Mode Code Reference ​

CodeDescription
1Matched table
2Hundred-player table
3Single-player table
4Fishing machine