Skip to main content

Balance Endpoint

This document describes the Get Player Balance endpoint for Klas Gaming Casino integration. This endpoint is used to retrieve a player's balance by player_id.


Endpoint

POST {WEBHOOK_URL}/balance

Note: {WEBHOOK_URL} is the webhook URL provided by the operator. Klas Gaming will send POST requests to this endpoint.


Headers

  • X-Signature: HMAC-SHA256 signature for message integrity (see Security Headers)
  • Content-Type: application/json

Request Body

{
"request_id": "string", // Required. Unique request identifier.
"timestamp": "number", // Required. Timestamp of the request (number).
"session_id": "string", // Required. Unique session identifier.
"player_id": "string" // Required. Unique player identifier from operator system.
}
ParameterTypeMandatoryDescription
request_idstringYesUnique request identifier.
timestampnumberYesTimestamp of the request.
player_idstringYesUnique identifier of the player from the operator's system.
session_idstringYesUnique identifier of the current player session.

Response Body

{
"balance": "30", // Player balance (e.g. 30 EUR)
"status_code": "OK" // Status code of the execution
}
ParameterTypeMandatoryDescription
balancestringYesPlayer balance (EUR 30)
status_codestringYesStatus code of the execution.

Flow Description

  1. Klas Gaming sends a POST request to /balance with the required fields and headers.
  2. The backend processes the request and retrieves the player's balance.
  3. The response includes the player's balance and a status code indicating the result.

Example Request

curl -X POST https://<your-api>/balance \
-H "Content-Type: application/json" \
-H "X-Signature: <hmac_signature>" \
-d '{
"request_id": "1234-5678-90ab-cdef12345678",
"timestamp": 1710000000,
"session_id": "1234-5678-90ab-cdef12345678",
"player_id": "12001"
}'

Example Response

{
"balance": "30",
"status_code": "OK"
}

Notes

  • All requests must be signed using the HMAC mechanism described in Security Headers.
  • For more details, refer to the Klas Gaming integration documentation or contact your integration representative.