GET /balance
| Name | Type | Description |
|---|
| X-Auth-Token | string | Custom authentication header in the format X-Auth-Token: your_token_here. This token is required to authorize API requests. |
Request Parameters
| Name | Type | Description |
|---|
| playerId | string | Unique identifier of the player whose balance is being retrieved. |
| gameUuid | string | Unique identifier of the game for which the request is being made. |
| sessionId | string | Unique identifier of the player’s session. |
| currency | string | The currency code for the transaction, typically in ISO 4217 format. |
Response Parameters
| Name | Type | Description |
|---|
| balance | decimal | The current balance of the player. |
If an error occurs while processing a request, the API must return a response with HTTP Status Code: 400 Bad Request
| Name | Type | Description |
|---|
| error_code | string | Error code describing the specific issue. |
Show Possible Error Codes
| Error Code | Description |
|---|
| INVALID_SESSION | The provided session ID is invalid or does not exist in the system. |
| TECHNICAL_ERROR | An unexpected error occurred. |
| NOT_AUTHORIZED | The request is not authorized due to invalid X-Auth-Token header. |
Responsibility of the wallet platform
Assert that the incoming sessionId is valid, and return the player’s current balance
GET /balance?playerId=123e4567-e89b-12d3-a456-426614174000
&sessionId=abc123-session-id¤cy=USD&gameUuid=game-uuid-456