Skip to main content

Balance - Query Balance

Query the player's current available balance.

Request Parameters

Request Before Decryption

{
"cipherText": "asdqwcqwqe"
}
info

For encryption description, please refer to Operator API Implementation Guide

Request After Decryption

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

Response Format

info

The response is plaintext JSON, no encryption is required.

Success Response

{
"status": "0000",
"errText": "",
"balance": 12345.67,
"responseTime": "2024-12-11T01:23:38.271Z"
}
FieldTypeDescription
statusstringStatus Code, see Status Code Description below
errTextstringError message, empty string on success
balancenumberCurrent available Balance
responseTimestringResponse time

Response Status and Transaction Result

StatusQuery StatusWhether to trigger retry
0000SuccessNo
9999FailureYes
TimeoutFailureYes

Important Notes

  1. Token validation: Token validity is checked for each query
  2. Real-time Balance: The returned Balance is the real-time available Balance
  3. Currency consistency: Ensure consistency with the currency set by VP
  4. Caching strategy: It is recommended for the Operator to cache Balance appropriately to reduce query frequency
  5. Concurrency control: May need to wait for lock release under high concurrency
  6. Retry strategy: Queries will continuously retry on timeout or failure, the mechanism is the same as BetNSettle
    • Retry frequency: Retry 5 times, using an exponential back-off policy between each retry (1s, 3s, 5s, 7s, 9s)