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.
}
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| request_id | string | Yes | Unique request identifier. |
| timestamp | number | Yes | Timestamp of the request. |
| player_id | string | Yes | Unique identifier of the player from the operator's system. |
| session_id | string | Yes | Unique identifier of the current player session. |
Response Body
{
"balance": "30", // Player balance (e.g. 30 EUR)
"status_code": "OK" // Status code of the execution
}
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| balance | string | Yes | Player balance (EUR 30) |
| status_code | string | Yes | Status code of the execution. |
Flow Description
- Klas Gaming sends a POST request to
/balancewith the required fields and headers. - The backend processes the request and retrieves the player's balance.
- 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.