Link Search Menu Expand Document

Rollback Credit

Overview

This page explains how to perform rollback operations, specifically for reversing previous winning transactions within the platform.

POST /open-api-games/v1/games-processor

Parameters

Request:

NameTypeDescription
apistringName of operation: “debit”, “credit”, “rollback”, “rollbackDebit”
dataobject 
data.userNickstringUser’s nick
data.amountlongUser balance (Example: 10000 = 100.00EUR)
data.denominationintCurrency denomination. Basically for fiat it equals 2 (for example 1 USD = 100 cents)
data.currencystringBalance currency. Passed by the link to open the game. See section “Managing Games and Connections”, field accounts[].gameEmbedUrl.
data.gameIdstring[Optional field] Game id is required for the providers who are using specific session mode. (F.E. Lobby Games)
data.userIdstringA unique user id
data.jpKeystringJackpot accumulation group id. Players with the same jpKey participate in a single pool of savings and jackpot winnings
data.spinMetaobject[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.linesintThe number of lines won.
data.spinMeta.betPerLinelongAmount of the bet per line in cents.
data.spinMeta.totalBetlongTotal bet on a reel.
data.spinMeta.symbolMatrixlongDescription 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.betMetaobject[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.betsobjectDescription of the player’s bets.
data.notesobject[Optional field] field for additional information about the win.

Response:

NameTypeDescription
apistringName of operation: “debit”, “credit”, “rollback”, “rollbackDebit”
isSuccessbooleanIs success?
errorstringEmpty string if isSuccess == true.
errorMsgstringError code, see “Errors” table
dataobject 
data.transactionIdstringId of transaction
data.userNickstringUser’s nick
data.amountlongUser balance (Example: 10000 = 100.00EUR)
data.denominationintCurrency denomination. Basically for fiat it equals 2 (for example 1 USD = 100 cents)
data.currencystringBalance currency. Passed by the link to open the game.

Errors:

NameDescription
NO_ERRORSNo errors. Passed if isSuccess == true.
ALREADY_PROCESSEDThe operation for this transaction has already been successfully processed.
SIGN_NOT_PROVIDEDSign header was not passed.
INVALID_SIGNInvalid signature.
UNKNOWN_CURRENCYUnknown currency.
INSUFFICIENT_BALANCEThe player’s balance is not enough to carry out the operation.
INTERNAL_ERRORInternal service error. The operation must be repeated.

Example

Request:

{
  "api": "rollback",
  "data": {
    "transactionId": "transaction-id",
    "gameSessionId": "game-session-id",
    "amount": 30,
    "currency": "USD",
    "betId": "round-id",
    "note": "some meta data"
  }
}

Response:

{
  "api": "rollback",
  "isSuccess": true,
  "error": "NO_ERRORS",
  "errorMsg": "",
  "data": {
    "transactionId": "transaction-id",
    "userNick": "t*****[email protected]",
    "amount": 145,
    "denomination": 2,
    "currency": "USD",
    "jpKey": "jpKey"
  }
}