Link Search Menu Expand Document

Credit

Overview

This page explains how to perform credit operations, specifically for processing winnings within the platform.

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

Notice!

The request `{"api": "credit"}` will be issued even in case of loose.

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.
data.freeGameobjectObject that is required to process free spins/bets
data.freeGame.gameIdstringGame id
data.freeGame.betintBet amount
data.freeGame.linesintNumber of lines
data.freeGame.deltaintAmount of spins to process

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.
data.freeGameslistInformation about available bonuses.
data.freeGames.bonusIdstringA bonus id
data.freeGames.gameslistList of available games
data.freeGames.games.idstringGame id
data.freeGames.games.initialintNumber of spins/bets at bonus init
data.freeGames.games.leftintNumber of spins/bets left
data.freeGames.games.betintBet amount
data.freeGames.games.linesintNumber of lines

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": "credit",
  "data": {
    "transactionId": "transaction-id",
    "gameSessionId": "session-id",
    "currency": "USD",
    "amount": 10,
    "betId": "bet-id",
    "notes": {
      "roundsRemaining": "0",
      "internalTransactionId": "internal-transaction-id",
      "internalRound": "0"
    }
  }
}

Response:

{
  "api": "credit",
  "isSuccess": true,
  "error": "NO_ERRORS",
  "errorMsg": "",
  "data": {
    "transactionId": "transaction-id",
    "userNick": "t*****[email protected]",
    "amount": 232,
    "denomination": 2,
    "currency": "USD",
    "jpKey": "jp-key",
    "freeGames": [
      {
        "bonusId": "887a1caa-e3d7-444e-99a3-d308040f2659",
        "games": [
          {
            "id": "ib_al",
            "initial": 20,
            "left": 20,
            "bet": 700,
            "lines": 9
          }
        ]
      }
    ]
  }
}

Free Credit

The way to process credit operation on free games.

Example

Request:

{
  "api": "credit",
  "data": {
    "transactionId": "transaction-id",
    "gameSessionId": "session-id",
    "currency": "USD",
    "amount": 0,
    "betId": "bet-id",
    "notes": {
      "roundsRemaining": "0",
      "internalTransactionId": "internal-transaction-id",
      "internalRound": "0"
    },
    "freeGame": {
      "gameId": "ib_al",
      "bet": 700,
      "lines": 9,
      "delta": 1
    }
  }
}

Response:

{
  "api": "credit",
  "isSuccess": true,
  "error": "NO_ERRORS",
  "errorMsg": "",
  "data": {
    "transactionId": "transaction-id",
    "userNick": "t*****[email protected]",
    "amount": 232,
    "denomination": 2,
    "currency": "USD",
    "jpKey": "jp-key",
    "freeGames": [
      {
        "bonusId": "887a1caa-e3d7-444e-99a3-d308040f2659",
        "games": [
          {
            "id": "ib_al",
            "initial": 20,
            "left": 20,
            "bet": 700,
            "lines": 9
          }
        ]
      }
    ]
  }
}