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.
POST /games/getBalance
Authorization: Bearer <access-token>
Content-Type: application/jsonRequest
| Field | Type | Required | Description |
|---|---|---|---|
player_id | string | Yes | Your player ID (the user_id of request-access). |
currency | string | No | Currency code. Default brl. |
session_token | string | No | KOI session token, forwarded to your endpoint. |
game | string | No | Game slug, forwarded to your endpoint. |
gameId | string | No | Forwarded to your endpoint. |
casinoId | string | No | Forwarded to your endpoint. |
{ "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.
{ "balance": 95.0, "currency": "BRL", "clientId": "acme" }Errors
| Status | When |
|---|---|
400 | No balance endpoint registered for your account. |
401 | Missing or invalid access token. |
404 | The access token does not belong to an account. |
422 | player_id missing. |
502 | Your balance endpoint failed or timed out. |