# Balance

This method is called by THNDR to initialise or refresh the balance of a player in a game.

#### Endpoint

```url
GET {operatorURL}/thndr/users/{userId}/balance
```

#### Path Parameters

* `operatorURL` - Base URL of the Operator’s API.
* `userId` -  Player identifier on the Operator’s platform.

#### Query Parameters

* `sessionId` - The session ID provided by the operator during user authentication.
* `currency` - Player's wallet currency (read more in [Currencies](/integration/server-webhooks/currencies.md)).

#### Expected Response

```json
{
    "balance": 12050
}
```

* `balance` - Balance in the smallest unit of the currency (e.g., cents for USD, pence for GBP)

#### Signature Verification

Verify the request signature using userId 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/balance.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.
