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:
| 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. |
data.freeGame | object | Object that is required to process free spins/bets |
data.freeGame.gameId | string | Game id |
data.freeGame.bet | int | Bet amount |
data.freeGame.lines | int | Number of lines |
data.freeGame.delta | int | Amount of spins to process |
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. |
data.freeGames | list | Information about available bonuses. |
data.freeGames.bonusId | string | A bonus id |
data.freeGames.games | list | List of available games |
data.freeGames.games.id | string | Game id |
data.freeGames.games.initial | int | Number of spins/bets at bonus init |
data.freeGames.games.left | int | Number of spins/bets left |
data.freeGames.games.bet | int | Bet amount |
data.freeGames.games.lines | int | Number of lines |
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": "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
}
]
}
]
}
}