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"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Fixed value "balance" |
| uid | string | Yes | Player Account |
| currency | string | Yes | Currency code |
| brand | string | Yes | Brand 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"
}
| Field | Type | Description |
|---|---|---|
| status | string | Status code, see the status code description below |
| errText | string | Error message, empty string when successful |
| balance | number | Current available Balance |
| responseTime | string | Response time |
Response Status and Transaction Result
| Status | Query Status | Whether It Triggers a Retry |
|---|---|---|
| 0000 | Success | No |
| 9999 | Failed | Yes |
| Timeout | Failed | Yes |
Important Notes
- Token Validation: The Token's validity is verified on every query
- Real-time Balance: The returned Balance is the real-time available Balance
- Currency Consistency: Ensure consistency with the currency configured in VP
- Caching Strategy: It is recommended that the Operator moderately cache the Balance to reduce query frequency
- Concurrency Control: Under high concurrency, it may be necessary to wait for lock release
- Query Frequency: Sent once every 10 seconds after the Player enters the game, until the Player leaves the game