Skip to main content
GitSlotPark calls your /GetBalance endpoint to check a player’s current balance before launching a game and at various points during gameplay. You implement this endpoint on your own server. Your server must return the player’s balance immediately — this callback is called frequently, so keep your response times low.

Endpoint

POST {your_callback_base_url}/GetBalance
Replace {your_callback_base_url} with the HTTPS base URL you registered with GitSlotPark (for example, https://casino.com/WalletService).
Your endpoint must be served over HTTPS and must always return HTTP 200, even when reporting an error. Use the result field in the JSON body to communicate success or failure.

Request parameters

GitSlotPark sends the following JSON body to your endpoint.
agentID
string
required
Your Partner ID assigned by GitSlotPark.
userID
string
required
The player’s ID in your system.
sign
string
required
HMAC-SHA-256 signature computed over agentID + userID (concatenated in that order) using your secret key. Expressed as a 64-character uppercase hex string.

Example request from GitSlotPark

{
  "agentID": "Partner01",
  "userID": "player_12345",
  "sign": "A1B2C3D4..."
}

Response fields

Your server must respond with Content-Type: application/json and HTTP 200.
result
integer
required
Result code. Use 0 for success. See result codes below.
balance
number
required
The player’s current balance, expressed to exactly 2 decimal places (for example, 150.75). Required when result is 0.
currency
string
ISO 4217 currency code for the player’s wallet (for example, "USD"). Optional but recommended.

Example success response

{
  "result": 0,
  "balance": 150.75,
  "currency": "USD"
}

Example error response (player not found)

{
  "result": 5,
  "message": "Player not found"
}

Result codes

CodeMeaning
0Success
1General error
3Invalid sign
5User not found

Notes

/GetBalance is called frequently during active gameplay. Serve it from a fast, low-latency data source — avoid expensive database queries on the hot path.
If you choose to verify the incoming sign, return result 3 on failure. Never reject the HTTP request itself; always return HTTP 200 with the appropriate result code in the JSON body.