# Game Events

THNDR calls this endpoint to notify the Operator of a game event. Operators can use these events to display notifications inside their apps.

{% hint style="info" %}
This feature is optional - it is not required to go live with our games.
{% endhint %}

{% hint style="danger" %}
For DepositsAPI users: the roundId property has the same value as depositId and can be used to associate transactions with game events.
{% endhint %}

#### Endpoint

```url
POST {operatorURL}/thndr/events
```

### PLAYER\_ROUND\_FINISHED Event

The **PLAYER\_ROUND\_FINISHED** event is sent by THNDR to notify the Operator when a player completes their round.

```json
{
    "event": "PLAYER_ROUND_FINISHED",
    "userId": "{USER_ID}",
    "roomId": "{ROOM_ID}",
    "roundId": "{ROUND_ID}",
    "gameId": "{GAME_ID}"
}
```

* `userId` - Player identifier on the Operator’s platform.
* `roomId` - Identifier for the game room. Players sharing the same roomId are participating in the same PvP match.
* `roundId` - Identifier of the game round this room belongs to.
* `gameId` - Game identifier. Possible values: `solitaire`, `blocks`, `twentyone`, `blackjack`, `slots`, `plinko` .<br>

### OPPONENT\_JOINED Event

The **OPPONENT\_JOINED** event is sent by THNDR to notify the Operator that an opposing player has joined a room previously created by the Operator’s player.

```json
{
    "event": "ROOM_JOINED",
    "userId": "{USER_ID}",
    "roomId": "{ROOM_ID}",
    "roundId": "{ROUND_ID}",
    "gameId": "{GAME_ID}",
    "opponentNick": "{OPPONENT_NICK}"
}
```

* `userId` - Identifier of the player on the Operator’s platform that created the room.
* `roomId` - Identifier for the game room. Players sharing the same roomId are participating in the same PvP match.
* `roundId` - Identifier of the game round this room belongs to.
* `gameId` - Game identifier. Possible values: `solitaire`, `blocks`, `twentyone`, `blackjack`, `slots`, `plinko` .
* `opponentNick` - Nick of the opponent that joined the room.

### OPPONENT\_ROUND\_FINISHED Event

The **OPPONENT\_ROUND\_FINISHED** event is sent by THNDR to notify the Operator that the opponent of their player has completed their round.

```json
{
    "event": "OPPONENT_ROUND_FINISHED",
    "userId": "{USER_ID}",
    "roomId": "{ROOM_ID}",
    "roundId": "{ROUND_ID}",
    "gameId": "{GAME_ID}",
    "opponentNick": "{OPPONENT_NICK}"
}

```

* `userId` - Player identifier on the Operator’s platform.
* `roomId` - Identifier for the game room. Players sharing the same roomId are participating in the same PvP match.
* `roundId` - Identifier of the Operator’s player round.
* `gameId` - Game identifier. Possible values: `solitaire`, `blocks`, `twentyone`, `blackjack`, `slots`, `plinko` .
* `opponentNick` - Nick of the opponent that finished their round.

### PLAYER\_SCORE\_ACCEPTED Event

The **PLAYER\_SCORE\_ACCEPTED** event is sent by THNDR to notify the Operator when the player's score was accepted and used for the match settlement.

```json
{
    "event": "PLAYER_SCORE_ACCEPTED",
    "userId": "{USER_ID}",
    "roomId": "{ROOM_ID}",
    "roundId": "{ROUND_ID}",
    "score": 1234,
    "gameId": "{GAME_ID}"
}
```

* `userId` - Player identifier on the Operator’s platform.
* `roomId` - Identifier for the game room. Players sharing the same roomId are participating in the same PvP match.
* `roundId` - Identifier of the Operator’s player round.
* `score` - The player's score.
* `gameId` - Game identifier. Possible values: `solitaire`, `blocks`, `twentyone`, `blackjack`, `slots`, `plinko` .

### Signature Verification

Verify the request signature using raw request body as the request payload. More in the [Request Signing](/integration/server-webhooks/request-signing.md) section.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thndr.io/integration/server-webhooks/game-events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
