Single Wallet API Introduction
What is Single Wallet Mode?
Single Wallet mode is a gaming integration solution where member balances are centrally managed by the operator. When placing bets or settling transactions, the gaming platform calls the operator's API in real-time to check balances and process transactions.
Differences with Transfer Wallet
| Feature | Single Wallet | Transfer Wallet |
|---|---|---|
| Balance Management | Managed by Operator | Managed by Platform |
| Betting Process | Real-time Deduction | Transfer then Bet |
| Implementation Requirements | Operator implements 4 APIs | Operator calls Platform APIs |
| Fund Flow | No Transfer Required | Transfer In/Out Required |
| Use Case | Operators with existing wallet systems | Newly established gaming platforms |
In Single Wallet mode:
- 🎮 Players play games on the gaming platform
- 🔐 Gaming platform verifies member identity via operator API
- 💰 For each bet, the platform calls operator API for deduction and rewards
- 📊 All balances and transaction records are managed by the operator
Documentation Structure
This documentation is divided into two main sections:
📘 Operator API Implementation (Required)
The operator must provide the game provider with a callback URL for API calls. The game provider will use the action parameter to distinguish between different operations:
| Action | Description | Documentation |
|---|---|---|
| balance | Query member available balance in real-time | View Documentation |
| betNSettle | Handle game betting and settlement (deduction + rewards) | View Documentation |
| rollback | Rollback abnormal transactions | View Documentation |
| retryBet | A retry mechanism dedicated to item and operator card retries. | View Documentation |
Unified Endpoint Example: POST https://operator.example.com/api/wallet
👉 Start Implementation: Operator API Implementation Guide
📗 Platform APIs (Called by Operator)
Operators can call the following platform APIs for member management and queries:
-
Member Management
- Create Member - Register new members on the platform
- Query Online Members - View currently online members
-
Game Management
- Get Game List - Query available games
- Get Popular Game List - Query popular game rankings
- Open Game - Generate game launch URL
-
Item Management
- Get Operator Card Information - Get Operator Card Information
- Use Operator Card - Use Operator Card
- Cancel Operator Card - Cancel used item
- Query Operator Card Status - Query item usage status
-
Bet Logs
- Get BetLog - Query member bet records
- Query Transaction Details - Query single bet details
- Get BetLog Reply - Generate bet replay URL
- get Daily Report - Query daily operation report
- Query Member Report - Query Member Report
Version Information
- Version: v2.0.0
- Type: Single Wallet Mode
- Encryption Method: AES-256-GCM
- Authentication Method: JWT Token + SHA256 Signature
Decrypted request content typically includes:
token: Gaming platform authentication tokenaccount: Player Accountnonce: Unique transaction identifier (UUID)timestamp: Request timestamp
Common Response Format
Success Response (With Data)
All non-operator implemented API responses are in plain JSON format, following this structure:
{
"code": 0,
"message": "No error.",
"data": {
// API-specific response data
},
"logUUID": "042d4437-cbe3-440a-8acf-4baff3722fd6"
}
| Field | Type | Description |
|---|---|---|
code | number | Status code, 0 indicates success |
message | string | Status message, "No error." on success |
data | object | API response data, varies by API |
logUUID | string | Request tracking ID for troubleshooting and log queries |
Success Response (No Data)
For operations that do not require returning data, the response format is as follows:
{
"code": 0,
"message": "No error.",
"logUUID": "042d4437-cbe3-440a-8acf-4baff3722fd6"
}
Error Response
{
"code": 7,
"message": "Internal server error.",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}
| Field | Type | Description |
|---|---|---|
code | number | Error code (non-zero), refer to error code table for each API |
message | string | Error description message |
logUUID | string | Request tracking ID for troubleshooting and log queries |
Testing Recommendations
- Use stage environment for development testing
- Ensure all error scenarios are properly handled
- Verify uniqueness of nonce
- Test network exceptions and timeout situations