Skip to main content

Seamless Wallet API Introduction

What is Seamless Wallet Mode?

Seamless Wallet Mode is a game integration solution where the Player's Balance is uniformly managed by the Operator. When VP performs operations such as Bet and Settlement, it will immediately call the API provided by the Operator to query Balance and process transactions.

Differences with Transfer Wallet

FeatureSeamless WalletTransfer Wallet
Balance ManagementManaged by OperatorManaged by VP
Betting ProcessReal-time DeductionTransfer then Bet
Implementation RequirementsOperator implements 4 APIsOperator calls VP APIs
Fund FlowNo Transfer RequiredTransfer In/Out Required
Use CaseOperators with existing wallet systemsNewly established Operators

In Seamless Wallet mode:

  1. 🎮 Players play games on VP
  2. 🔐 VP verifies player identity via operator API
  3. 💰 For each bet, VP calls operator API for deduction and rewards
  4. 📊 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 needs to provide VP with a callback URL for VP to use. VP will differentiate between different operations via the action parameter:

ActionDescriptionDocumentation
balanceQuery player available balance in real-timeView Documentation
betNSettleHandle game betting and settlement (deduction + rewards)View Documentation
rollbackRollback abnormal transactionsView Documentation
retryBetRetry mechanism specifically for Items and Operator Cards retriesView Documentation

Unified Endpoint Example: POST https://operator.example.com/api/wallet

👉 Start Implementation: Operator API Implementation Guide

📗 VP APIs (Called by Operator)

Operators can call the following VP APIs for player management and queries:

Version Information

  • Version: v2.0.0
  • Type: Seamless Wallet Mode
  • Encryption Method: AES-256-GCM
  • Authentication Method: JWT Token + SHA256 Signature

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"
}
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 data to be returned, 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"
}
FieldTypeDescription
codenumberError code (non-zero), refer to error code table for each API
messagestringError description message
logUUIDstringRequest tracking ID for troubleshooting and log queries

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