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
| Parameter | Type | Required | Description |
|---|---|---|---|
| agent | String | ✅ | Agent ID (provided by the platform) |
| timestamp | String | ✅ | Unix timestamp (milliseconds) |
| param | String | ✅ | Encrypted parameter string, encrypted using AESEncrypt(param, DESKey) |
| key | String | ✅ | MD5 checksum string, generated using MD5(agent+timestamp+MD5Key) |
📋 Interface List
Query Balance Interface (s:1001)
param Structure
| Parameter | Type | Required | Description |
|---|---|---|---|
| s | Integer | ✅ | Operation subtype (fixed at 1001) |
| account | String | ✅ | Player account |
| currency | String | ✅ | Currency code |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| m | String | Primary operation type |
| s | Integer | Operation subtype (1001 = query balance interface) |
| d | Object | Data object |
| d.code | Integer | Response code |
| d.account | String | Player account |
| d.money | Number | Account balance |
Response example
json
{
"m": "/seamlesswallet",
"s": 1001,
"d": {
"code": 0,
"account": "player001",
"money": 1000.50
}
}Place Bet Interface (s:1002)
param Structure
| Parameter | Type | Required | Description |
|---|---|---|---|
| s | Integer | ✅ | Operation subtype (fixed at 1002) |
| account | String | ✅ | Player account |
| orderId | String | ✅ | Order ID |
| gameNo | String | ✅ | Game round ID |
| kindId | Integer | ✅ | Game type ID (see Game List) |
| money | Number | ✅ | Bet amount |
| currency | String | ✅ | Currency code |
| roomMode | String | ✅ | Game mode |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| m | String | Primary operation type |
| s | Integer | Operation subtype (1002 = place bet interface) |
| d | Object | Data object |
| d.code | Integer | Response code |
| d.account | String | Player account |
| d.money | Number | Balance 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| s | Integer | ✅ | Operation subtype (fixed at 1003) |
| account | String | ✅ | Player account |
| orderId | String | ✅ | Order ID |
| gameNo | String | ✅ | Game round ID |
| kindId | Integer | ✅ | Game type ID (see Game List) |
| money | Number | ✅ | Return amount |
| currency | String | ✅ | Currency code |
| roomMode | String | ✅ | Game mode |
| betCount | Integer | ✅ | Total number of successful bets |
| totalBet | Number | ✅ | Bet amount |
| validBet | Number | ✅ | Valid bet amount |
| totalWithdraw | Number | ✅ | Game win/loss amount |
| revenue | Number | ✅ | Rake amount |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| m | String | Primary operation type |
| s | Integer | Operation subtype (1003 = return balance interface) |
| d | Object | Data object |
| d.code | Integer | Response code |
| d.account | String | Player account |
| d.money | Number | Balance 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| s | Integer | ✅ | Operation subtype (fixed at 1004) |
| account | String | ✅ | Player account |
| orderId | String | ✅ | Order ID |
| gameNo | String | ✅ | Round ID |
| kindId | Integer | ✅ | Game type ID (see Game List) |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| m | String | Primary operation type |
| s | Integer | Operation subtype (1004 = query order interface) |
| d | Object | Data object |
| d.code | Integer | Response code |
| d.status | Integer | Transaction order status code |
Response example
json
{
"m": "/seamlesswallet",
"s": 1004,
"d": {
"code": 0,
"status": 1
}
}Cancel Bet Interface (s:1005)
param Structure
| Parameter | Type | Required | Description |
|---|---|---|---|
| s | Integer | ✅ | Operation subtype (fixed at 1005) |
| account | String | ✅ | Player account |
| money | Number | ✅ | Amount to cancel |
| orderId | String | ✅ | Order ID |
| kindId | Integer | ✅ | Game type ID (see Game List) |
| gameNo | String | ✅ | Game round ID |
| currency | String | ✅ | Currency code |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| m | String | Primary operation type |
| s | Integer | Operation subtype (1005 = cancel bet interface) |
| d | Object | Data object |
| d.code | Integer | Response code |
| d.status | Integer | Cancellation 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
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Insufficient balance |
| 2 | Member account does not exist |
| 3 | Under maintenance |
| 4 | Token verification error |
| 5 | Invalid data format |
| 6 | Decryption error |
| 7 | MD5 error |
| 8 | Unknown operation subtype |
| 9 | Duplicate order ID |
| 10 | Agent does not exist |
| 11 | Account is being deposited/withdrawn |
| 12 | Order not found |
| 13 | Server error |
| 32 | Failed to retrieve player information |
📦 Transaction Order Status Codes
| Code | Description |
|---|---|
| 1 | Success |
| 2 | Failed |
| 3 | Processing |
| 4 | Order not found |
| 5 | Other error |
⚠️ Cancellation Status Code Reference
| Code | Description |
|---|---|
| 1 | Success |
| 2 | Failed |
🃏 Game Mode Code Reference
| Code | Description |
|---|---|
| 1 | Matched table |
| 2 | Hundred-player table |
| 3 | Single-player table |
| 4 | Fishing machine |
