> For the complete documentation index, see [llms.txt](https://docs.thndr.io/integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thndr.io/integration/server-webhooks/game-events.md).

# 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.
