Action 8: BetNSettle
Function Description
-
JDB will call the API when player bet, and inform this game result.
-
Please use bet or mb to confirm whether the player's balance is sufficient, and after deducting or adding funds with netWin, return the remaining amount to the player.
- bet:
- If the player's balance is greater than or equal to bet, this request should be processed.
- If the player's balance is less than bet, please return error code 6006.
- mb:
- If the player's balance is greater than or equal to mb, this request should be processed.
- If the player's balance is less than mb, then reply with 6006.
- bet:
-
The response will contain a field:
mb
, with which the customers can check whether the balance is enough.-
mb
is the abbreviation for minimum balance. -
How to use: when player's balance >= mb, this is a legal bet.
-
How to calculate:
-
The
mb
of non-fish game means bet. -
The
mb
of fish game means:-
Iterate on the bullet list. For each bullet:
-
accumulated cost =
previous accumulated cost
+bet
-previous win
-
mb
= Max(previous mb
,accumulated cost
) -
For example: bet = 24, win = 29 in game results.
bet win accumulated cost mb 1 10 \=0 + 1 - 0 = 1 Max(0, 1) = 1 5 5 \=1 + 5 - 10 = -4
Max(1, -4) = 1 10 0 \= -4 + 10 - 5 = 1 Max(1, 1) = 1 5 4 \=1 + 5 - 0 =6 Max(1, 6) = 6 1 10 \=6 + 1 - 4 = 3 Max(6, 3) = 6 1 0 \=3 + 1 - 10 = -6 Max(6, -6) = 6 1 0 \=-6 + 1 - 0 = -5 Max(6, -5) = 6 -
In the previous example, the final mb is 6. That is, the player's balance should be at least 6.
-
-
-
-
When a response times out or a correctly formatted response is not received (please refer to the image below), Cancel BetNSettle (Action 4) will be called after one minute.
Request Parameter
Parameter | Format | Description |
---|---|---|
action | Integer | 8 |
ts | Long | Current system time |
transferId | Long | Transfer ID |
historyId | String(100) | Game History ID See Explanation of historyId |
uid | String(50) | Player ID, Only allow a-z & 0-9 and underscores (_) and hyphens (-) |
gType | Integer | Game types See Game Provider |
mType | Integer | Machine Type |
reportDate | String(10) | Report Date (dd-MM-yyyy) |
gameDate | String(19) | Game Date (dd-MM-yyyy HH:mm:ss) |
currency | String(10) | Please refer to: Currency Code |
bet | Double | Bet Amount (always be negative) |
mb | Double | Player Minimum Balance |
win | Double | Game Win (Include bet amount) |
netWin | Double | Total Net Win |
lastModifyTime | String(19) | Last Modified Time (dd-MM-yyyy HH:mm:ss) |
sessionNo | String(50) | Session No. , will be different in each game. Recommend when the JDB lobby is not in use.This is not included by default, contact JDB service if needed. |
systemSessionId | String(150) | System Session ID, will be different in each login when using action 21 get game launch url. Game Type supports range: SLOT(0), FISH(7), ARCADE(9), LOTTERY(12), CARD(18) This is not included by default, contact JDB service if needed. |
More data fields are vary by gType, listed in the following table:
Betting records in slot games: gType = 0
Parameter | Format | Description |
---|---|---|
denom | Double | Denom |
systemTakeWin | Integer | System Take Win: 0: No 1: Yes |
jackpotWin | Double | The amount of the jackpot won |
jackpotContribute | Double | Jackpot contributions |
hasFreeGame | Integer | Free game 0: No 1: Yes |
hasGamble | Integer | Gambling Game 0: No 1: Yes |
hasBuyFeature | Integer | Buy Feature Game 0: No 1: Yes |
Betting records in fishing game: gType = 7
Parameter | Format | Description |
---|---|---|
denom | Double | Denom |
systemTakeWin | Integer | System Take Win: 0: No 1: Yes |
roomType | Integer | Game Room -1: Lobby (Achievement Game) 0: Small Bet 1: Medium sized bet 2: Large bet Real naming of game room differentiated by Machine Type |
Betting records in Arcade games: gType = 9
Parameter | Format | Description |
---|---|---|
denom | Double | Denom |
systemTakeWin | Integer | System Take Win: 0: No 1: Yes |
hasBonusGame | Integer | Bonus game 0: No 1: Yes |
hasGamble | Integer | Gambling Game 0: No 1: Yes |
Betting records in Lottery Game: gType = 12
Parameter | Format | Description |
---|---|---|
denom | Double | Denom |
systemTakeWin | Integer | System Take Win: 0: No 1: Yes |
hasBonusGame | Integer | Bonus game 0: No 1: Yes |
Request Example: Slot
{
"action": 8,
"ts": 1447452951820,
"transferId": 1001,
"historyId": "5250145705663",
"uid": "test01",
"gType": 0,
"mType": 8001,
"reportDate": "11-07-2018",
"gameDate": "11-07-2018 13:37:39",
"currency": "RB",
"bet": -5.25,
"mb": 5.25,
"win": 2,
"netWin": -3.25,
"lastModifyTime": "11-07-2018 13:37:45",
"denom": 0.01,
"systemTakeWin": 0,
"jackpotWin": 0,
"jackpotContribute": -0.02625,
"hasFreeGame": 0,
"hasGamble": 0
}
Request Example: Fish
{
"action": 8,
"ts": 1447452951820,
"transferId": 1001,
"historyId": "5250145705663",
"uid": "test01",
"gType": 7,
"mType": 7001,
"reportDate": "11-07-2018",
"gameDate": "11-07-2018 13:37:39",
"currency": "RB",
"bet": -5.25,
"mb": 5.25,
"win": 2,
"netWin": -3.25,
"lastModifyTime": "11-07-2018 13:37:45",
"denom": 0.01,
"systemTakeWin": 0,
"roomType": 0
}
Request Example: Arcade
{
"action": 8,
"ts": 1447452951820,
"transferId": 1001,
"historyId": "5250145705663",
"uid": "test01",
"gType": 9,
"mType": 9001,
"reportDate": "11-07-2018",
"gameDate": "11-07-2018 13:37:39",
"currency": "RB",
"bet": -5.25,
"mb": 5.25,
"win": 2,
"netWin": -3.25,
"lastModifyTime": "11-07-2018 13:37:45",
"denom": 0.01,
"systemTakeWin": 0,
"hasGamble": 0,
"hasBonusGame": 0
}
Request Example: Lottery
{
"action": 8,
"ts": 1447452951820,
"transferId": 1001,
"historyId": "5250145705663",
"uid": "test01",
"gType": 12,
"mType": 12001,
"reportDate": "11-07-2018",
"gameDate": "11-07-2018 13:37:39",
"currency": "RB",
"bet": -5.25,
"mb": 5.25,
"win": 2,
"netWin": -3.25,
"lastModifyTime": "11-07-2018 13:37:45",
"denom": 0.01,
"systemTakeWin": 0,
"hasBonusGame": 0
}
Request Example: FC, YB, AMB
{
"action": 8,
"ts": 1447452951820,
"transferId": 1001,
"historyId": "5250145705663",
"uid": "test01",
"gType": 30,
"mType": 30001,
"reportDate": "11-07-2018",
"gameDate": "11-07-2018 13:37:39",
"currency": "RB",
"bet": -5.25,
"win": 2,
"netWin": -3.25,
"lastModifyTime": "11-07-2018 13:37:45"
}
Response Parameter
Parameter | Format | Description |
---|---|---|
status | String(4) | Success: 0000 Error: 6006 - Player balance is insufficient It would be considered as failure if the status is not 0000, and you can describe in err_text. |
balance | String | Balance |
err_text | String(255) | Error message |
Response Example
{
"status": "0000",
"balance": "12345.67",
"err_text": ""
}