Terminate Session Endpoint
This document describes the Terminate Session endpoint for Klas Gaming Casino integration. This endpoint is used to notify the operator system when a player session is finished.
Endpoint
POST {WEBHOOK_URL}/terminate
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.
"game_code": "string" // Optional. Unique game identifier. Empty if no active game session.
}
| 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. |
| game_code | string | No | Unique game identifier. Empty if no active game session. |
Response Body
{
"status_code": "OK" // Status code of the execution
}
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| status_code | string | Yes | Status code of the execution. |
Possible Status Codes
| Status Code | Reason |
|---|---|
| OK | Request successful |
| ERR_UNKNOWN | Internal server error |
| ERR_TIMEOUT | Timeout exception |
Flow Description
- Klas Gaming sends a POST request to
/terminatewith the required fields and headers. - The backend processes the request and terminates the player session.
- The response includes a status code indicating the result.
Example Request
curl -X POST https://<your-api>/terminate \
-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",
"game_code": "ABSlot"
}'
Example Response
{
"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.