Skip to main content

Balance - Query Balance

Query the player's current available balance.

Request Parameters

Request Before Decryption

{
"cipherText": "asdqwcqwqe"
}
info

For encryption details, refer to Operator API Implementation Guide

Request After Decryption

{
"action": "balance",
"uid": "gameTest1",
"currency": "PHP",
"brand": "VP"
}
ParameterTypeRequiredDescription
actionstringYesFixed value "balance"
uidstringYesPlayer Account
currencystringYesCurrency code
brandstringYesBrand code, fixed value VP

Response Format

info

The response is in plaintext JSON and does not need to be encrypted.

Success Response

{
"status": "0000",
"errText": "",
"balance": 12345.67,
"responseTime": "2024-12-11T01:23:38.271Z"
}
FieldTypeDescription
statusstringStatus code, see the status code description below
errTextstringError message, empty string when successful
balancenumberCurrent available Balance
responseTimestringResponse time

Response Status and Transaction Result

StatusQuery StatusWhether It Triggers a Retry
0000SuccessNo
9999FailedYes
TimeoutFailedYes

Important Notes

  1. Token Validation: The Token's validity is verified on every query
  2. Real-time Balance: The returned Balance is the real-time available Balance
  3. Currency Consistency: Ensure consistency with the currency configured in VP
  4. Caching Strategy: It is recommended that the Operator moderately cache the Balance to reduce query frequency
  5. Concurrency Control: Under high concurrency, it may be necessary to wait for lock release
  6. Query Frequency: Sent once every 10 seconds after the Player enters the game, until the Player leaves the game