Transfer Wallet API Introduction
What is Transfer Wallet Mode?
Transfer Wallet mode is a gaming integration solution where player balances are divided into main wallet and game wallet. Players need to transfer funds from the main wallet to the game wallet before placing bets. After the game, the balance can be transferred back to the main wallet.
Differences with Seamless Wallet
| Feature | Transfer Wallet | Seamless Wallet |
|---|---|---|
| Balance Management | Managed by VP | Managed by Operator |
| Betting Process | Transfer then Bet | Real-time Deduction |
| Implementation Requirements | Operator calls VP APIs | Operator implements 4 APIs |
| Fund Flow | Transfer In/Out Required | No Transfer Required |
| Use Case | Operators requiring fund isolation | Operators with existing wallet systems |
In Transfer Wallet mode:
- 🎮 Players first transfer funds from main wallet to game wallet
- 🔐 VP uses transferred funds for gaming
- 💰 Betting and settlement occur within the game wallet
- 📊 After gaming, balance can be transferred back to main wallet
Documentation Structure
This documentation contains the following functional modules:
📗 VP APIs (Called by Operator)
Operators can call the following VP APIs for player management, fund transfers, and queries:
Fund Transfer
-
Transfer - Transfer funds from Main Wallet
-
QueryPlayerBalance - Query Main Wallet and Game Wallet balance
-
Query Transaction Details - Query single transfer details
-
Cash Out All - Withdraw Game Wallet balance to Main Wallet
-
player Management
- Create Player - Register new players on VP
- Query Online Players - View currently online players
- Query Player Session - Check player login status
- Force Logout - Force logout player
-
Game Management
- Query Game List - Query available games
- Query popular sorted gameList - Query popular sorted gameList
- Open Game - Generate game launch URL
-
Operator Card Management
- Get Operator Card Information - Get Operator Card Information
- Send Operator Card - Send Operator Card
- Cancel Operator Card - Cancel Used Operator Card
- Get Operator Card Status - Get Operator Card Usage Status
Bet Logs
- Query Bet Logs & Reports - Query player bet records
- Query Bet Details - Query single bet details
- Query Bet Replay - Generate bet replay URL
- Query Daily Report - Query daily operation report
- Query player report - Query player report
Version Information
- Version: v2.0.0
- Type: Transfer Wallet Mode
- Encryption Method: AES-256-GCM
- Authentication Method: JWT Token + SHA256 Signature
Decrypted request content typically includes:
token: VP authentication tokenaccount: Player Accountnonce: Unique transaction identifier (UUID)timestamp: Request timestamp
Common Response Format
Success Response (With Data)
All 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 data return, the response format is as follows:
{
"code": 0,
"message": "No error.",
"logUUID": "042d4437-cbe3-440a-8acf-4baff3722fd6"
}
Error Response
{
"code": 6,
"message": "The username already exist.",
"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 |
Common Response Codes
Below are common response codes. For detailed error codes, please refer to "Appendix" page.
FAQ
Q1: What decimal precision should be set for the Wallet Balance?
A: Supports up to 6 decimal places (0.000001).
Fund Flow
Testing Recommendations
- Use test environment for development testing
- Ensure all error scenarios are properly handled
- Verify uniqueness of nonce
- Test network exceptions and timeout situations
- Regularly query balance to ensure correct funds
Important Notes
- Dual Wallet: Need to manage both main wallet and game wallet balances
- Transfer Confirmation: Recommend using balance query API to confirm after transfer/withdrawal operations
- Balance Management: Ensure game wallet has sufficient balance for gaming
- Transaction Tracking: Save all transfer records for reconciliation
- Exception Handling: Properly handle and notify players when transfer fails