Skip to content

balance — Balance Inquiry ​

Retrieves the player's current balance. This is the only callback that does not move money, and it is not retried on failure.

http
POST {wallet_base_url}/balance

When It Is Called ​

MomentDescription
Entering the game screenWhen the player arrives via the launch URL and the lobby or game screen first loads. If a balance was received within the last 10 seconds, that value is used and no call is made
Balance refreshWhen the player refreshes the balance on screen. At most once every 10 seconds per connection
Connection checkWhen the platform tests connectivity and signing after the integration application (Connection Check)

The platform also shows the balance from debit, credit, and rollback responses on the player's screen immediately, so it does not call balance separately for every bet or settlement. It is not called at game launch (POST /launch) either.

Request ​

Headers are the same as the common headers.

FieldTypeRequiredDescription
external_idstring●Operator-side player ID
player_idstring | null●Platform player ID (pl_…), for reference. null in connection check calls
currencystring●Player currency (e.g. PHP)
operator_session_idstring | null●The value sent at game launch. null if none was sent
http
POST /wallet/balance HTTP/1.1
Host: api.example-casino.com
Content-Type: application/json; charset=utf-8
X-Operator: acme
X-Timestamp: 1792547400123
X-Nonce: Q2x7mN0pR4sT8vW1yZ3bC5dE
X-Signature: 5f0c1e9a…(64 hex characters)

{"currency":"PHP","external_id":"u-102938","operator_session_id":"s-88af21","player_id":"pl_0199e8b4f2a37c1d8e5b6a4f3c2d1e0b"}

Response ​

FieldTypeRequiredDescription
statusstring●OK or an error status
balanceinteger● when OKCurrent balance, integer in the minor unit
json
{ "status": "OK", "balance": 1250000 }
json
{ "status": "PLAYER_NOT_FOUND" }
json
{ "status": "CURRENCY_MISMATCH" }
json
{ "status": "INVALID_SIGNATURE" }
statusWhen to use
OKWhen returning the balance. Always include balance
PLAYER_NOT_FOUNDWhen no player matches the external_id
CURRENCY_MISMATCHWhen the request currency differs from the player's currency
INVALID_SIGNATUREWhen signature verification fails
INVALID_REQUESTWhen external_id is empty or the body is malformed
UNKNOWN_ERRORAny other internal error

You may return OK for a balance inquiry even if the player is blocked. Betting is blocked by PLAYER_BLOCKED on debit.

Platform Behavior ​

ResultPlatform handling
OK + balanceShows the balance on screen and caches it for 10 seconds
OK without balanceTreated as a failure
A status other than OK, 3-second timeout, non-HTTP-200, connection failureIf a balance known within the last 10 seconds exists, that value is shown; otherwise the balance is left blank (on screen entry) or a refresh failure (WALLET_UNAVAILABLE) is reported
  • Not retried. A failed balance inquiry does not block betting — whether a bet is possible is determined solely by the debit result.
  • balance must not change the balance. Implement it as read-only.

Docs v1.0.0 · Operator API v1