POST /credit-debit
This operation is idempotent.
Headers
| 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. |
| creditAmount | decimal | Amount to credit. |
| debitAmount | decimal | Amount to debit. |
| gameUuid | string | Unique identifier of the game. |
| sessionId | string | Unique identifier of the player session. |
| roundId | string | Unique identifier of the game round. |
| transactionId | string | Unique identifier of the game round transaction. |
| transactionType | string | Type of transaction, e.g., ‘CREDIT_DEBIT_SPIN’. |
| transactionTimestamp | integer | Timestamp of the transaction in milliseconds. |
| roundStarted | boolean | Flag indicating start of the round. |
| roundFinished | boolean | Flag indicating end of the round. |
| currency | string | Currency code of the player. |
Transaction Types: Enum representing the type of transaction.
CREDIT_DEBIT_SPIN: A regular spin-based transaction.CREDIT_DEBIT_PURCHASE: A transaction where the player directly purchases a bonus feature within the game.
Response Parameters
| Name | Type | Description |
|---|---|---|
| balance | decimal | The updated balance of the player. |
Error
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. |
Responsibility of the wallet platform
roundId, playerId, transactionId and amount to ensure that future debit or rollback operations can be reliably processed, maintaining the integrity of the player’s balance throughout the game session.