Skip to content
KOI Games Developer

Operators

Player balance

Ask KOI to call your balance endpoint for a player and return the result. Useful to check that your balance endpoint and signature work end to end.

http
POST /games/getBalance
Authorization: Bearer <access-token>
Content-Type: application/json

Request

FieldTypeRequiredDescription
player_idstringYesYour player ID (the user_id of request-access).
currencystringNoCurrency code. Default brl.
session_tokenstringNoKOI session token, forwarded to your endpoint.
gamestringNoGame slug, forwarded to your endpoint.
gameIdstringNoForwarded to your endpoint.
casinoIdstringNoForwarded to your endpoint.
json
{ "player_id": "player-123", "currency": "BRL" }

KOI then calls your balance endpoint with the balance callback.

Response

200 OK with the fields returned by your endpoint.

json
{ "balance": 95.0, "currency": "BRL", "clientId": "acme" }

Errors

StatusWhen
400No balance endpoint registered for your account.
401Missing or invalid access token.
404The access token does not belong to an account.
422player_id missing.
502Your balance endpoint failed or timed out.