Skip to main content

Transfer Wallet API Introduction

What is Transfer Wallet Mode?

Transfer Wallet mode is a gaming integration solution where member 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 Single Wallet

FeatureTransfer WalletSingle Wallet
Balance ManagementManaged by PlatformManaged by Operator
Betting ProcessTransfer then BetReal-time Deduction
Implementation RequirementsOperator calls Platform APIsOperator implements 4 APIs
Fund FlowTransfer In/Out RequiredNo Transfer Required
Use CasePlatforms requiring fund isolationOperators with existing wallet systems

In Transfer Wallet mode:

  1. 🎮 Players first transfer funds from main wallet to game wallet
  2. 🔐 Gaming platform uses transferred funds for gaming
  3. 💰 Betting and settlement occur within the game wallet
  4. 📊 After gaming, balance can be transferred back to main wallet

Documentation Structure

This documentation contains the following functional modules:

📗 Platform APIs (Called by Operator)

Operators can call the following platform APIs for member management, fund transfers, and queries:

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: Gaming platform authentication token
  • account: Player Account
  • nonce: 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"
}
FieldTypeDescription
codenumberStatus code, 0 indicates success
messagestringStatus message, "No error." on success
dataobjectAPI response data, varies by API
logUUIDstringRequest 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": 6,
"message": "The username already exist.",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}
FieldTypeDescription
codenumberError code (non-zero), refer to error code table for each API
messagestringError description message
logUUIDstringRequest tracking ID for troubleshooting and log queries

Common Response Codes

Below are common response codes. For detailed error codes, please refer to "Appendix" page.

Fund Flow

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
  • Regularly query balance to ensure correct funds

Important Notes

  1. Dual Wallet: Need to manage both main wallet and game wallet balances
  2. Transfer Confirmation: Recommend using balance query API to confirm after transfer/withdrawal operations
  3. Balance Management: Ensure game wallet has sufficient balance for gaming
  4. Transaction Tracking: Save all transfer records for reconciliation
  5. Exception Handling: Properly handle and notify players when transfer fails