Rollback Debit
Overview
This page explains how to perform rollback debit operations, specifically for reversing previous bet transactions within the platform.
POST /open-api-games/v1/games-processor
Parameters
Request:
| Name | Type | Description |
|---|---|---|
api | string | Name of operation: “debit”, “credit”, “rollback”, “rollbackDebit” |
data | object | |
data.userNick | string | User’s nick |
data.amount | long | User balance (Example: 10000 = 100.00EUR) |
data.denomination | int | Currency denomination. Basically for fiat it equals 2 (for example 1 USD = 100 cents) |
data.currency | string | Balance currency. Passed by the link to open the game. See section “Managing Games and Connections”, field accounts[].gameEmbedUrl. |
data.gameId | string | [Optional field] Game id is required for the providers who are using specific session mode. (F.E. Lobby Games) |
data.userId | string | A unique user id |
data.jpKey | string | Jackpot accumulation group id. Players with the same jpKey participate in a single pool of savings and jackpot winnings |
data.spinMeta | object | [Optional field] User-selected bets and combinations in any regular format. Recommended for implementation to quickly resolve disputes with the player, bypassing requests to technical support. |
data.spinMeta.lines | int | The number of lines won. |
data.spinMeta.betPerLine | long | Amount of the bet per line in cents. |
data.spinMeta.totalBet | long | Total bet on a reel. |
data.spinMeta.symbolMatrix | long | Description of the position of symbols on the player’s screen at the moment of winning. An example is given for a slot game with 3 reels, 3 cells each. The first array corresponds to the top line of the playing field. The second array is on the second line, and so on. |
data.betMeta | object | [Optional field] Information about the bet game when the player wins. Recommended for implementation to quickly resolve disputes with the player, bypassing requests to technical support. |
data.betMeta.bets | object | Description of the player’s bets. |
data.notes | object | [Optional field] field for additional information about the win. |
Response:
| Name | Type | Description |
|---|---|---|
api | string | Name of operation: “debit”, “credit”, “rollback”, “rollbackDebit” |
isSuccess | boolean | Is success? |
error | string | Empty string if isSuccess == true. |
errorMsg | string | Error code, see “Errors” table |
data | object | |
data.transactionId | string | id of transaction |
data.userNick | string | User’s nick |
data.amount | long | User balance (Example: 10000 = 100.00EUR) |
data.denomination | int | Currency denomination. Basically for fiat it equals 2 (for example 1 USD = 100 cents) |
data.currency | string | Balance currency. Passed by the link to open the game. |
Errors:
| Name | Description |
|---|---|
| NO_ERRORS | No errors. Passed if isSuccess == true. |
| ALREADY_PROCESSED | The operation for this transaction has already been successfully processed. |
| SIGN_NOT_PROVIDED | Sign header was not passed. |
| INVALID_SIGN | Invalid signature. |
| UNKNOWN_CURRENCY | Unknown currency. |
| INSUFFICIENT_BALANCE | The player’s balance is not enough to carry out the operation. |
| INTERNAL_ERROR | Internal service error. The operation must be repeated. |
Example
Request:
{
"api": "rollbackDebit",
"data": {
"transactionId": "transaction-id",
"gameSessionId": "game-session-id",
"amount": 30,
"currency": "USD",
"betId": "round-id",
"note": "some meta data"
}
}
Response:
{
"api": "rollbackDebit",
"isSuccess": true,
"error": "NO_ERRORS",
"errorMsg": "",
"data": {
"transactionId": "transaction-id",
"userNick": "t*****[email protected]",
"amount": 145,
"denomination": 2,
"currency": "USD",
"jpKey": "jpKey"
}
}