Wager And Result
Wager And Result
Places a wager and sets the result amount at the same time. Idempotency must be provided, which means equal requests should only be processed once. If a request is duplicated, that is, the requests have the same transactionid, the original response must be sent with the status 200, Success - duplicate request status.
Responsibilities of the casino platform
The same as in the separate Wager and Result requests.
Request Parameters
| Parameter | Data Type | Mandatory | Description |
|---|---|---|---|
accountid |
String(60) [0-9a-zA-Z] | Required | Account ID Example: 5179068 |
apiversion |
String | Required | The API version that will be used Example: 1.2 |
betamount |
Decimal (32,10) | Required | The wager amount (total of real and bonus money) Note: Must be 0 for free round transactions when frbid is providedExamples: 2, 0.4, 0.01 (regular), 0 (free rounds) |
device |
String | Required | The device currently used by the player Valid values: desktop, mobile |
frbid |
String | Optional* | Free Round Bonus ID - Must be the templateId from FRB assign response*Required for free round transactions Example: 123abc456 (the templateId from assign response)Note: The FRB result can be sent without a separate wager |
gameid |
String | Required | Groove game ID Note: Can contain letters and special characters Example: 80102, game_123, slot-abc |
gamesessionid |
String(64) | Required | The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
gamestatus |
String | Required | Game Status Valid values: completed, pending |
request |
String | Required | Request method name Example: wagerAndResult |
result |
Decimal (32,10) | Required | The amount of money won by the player Example: 2.25 |
roundid |
String(255) | Required | Round ID Example: 802d1812c32686748f2afbcacfcc82114cf |
transactionid |
String(255) | Required | Transaction ID Example: 7617edd0924c11e7abb2865556898ad0 |
Request Examples
Regular Wager and Result (No Free Rounds)
/groove?request=wagerAndResult&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&betamount=5.0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completedFree Round Wager and Result
/groove?request=wagerAndResult&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&betamount=0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completed&frbid=123abc456**Free Round Transactions:** - `betamount` must be `0` when using free rounds - `frbid` must be the `templateId` from the FRB assign response - The `result` amount represents the win from the free round
Response Parameters
| Parameter | Data Type | Mandatory | Description |
|---|---|---|---|
apiversion |
String | Required | The version of the API being used Example: 1.2 |
balance |
Decimal (32,10) | Required | The total balance amount after the transaction Examples: 500, 140.25 |
bonus_balance |
Decimal (32,10) | Optional | The player’s bonus balance Example: 50.0 |
bonusmoneybet |
Decimal (32,10) | Required | The bonus amount used in the bet If casino doesn’t work with bonuses, value must be 0 |
bonusWin |
Decimal (32,10) | Required | The bonus amount won If casino doesn’t work with bonuses, value must be 0 |
code |
Integer | Required | Response code Example: 200 |
game_mode |
Integer | Optional* | Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
order |
String | Optional* | The type of order Valid values: cash_money, bonus_money*Required for CMA-compliant games |
real_balance |
Decimal (32,10) | Required | The player’s real balance Example: 100.0 |
realmoneybet |
Decimal (32,10) | Required | The real money amount used in the bet |
realmoneyWin |
Decimal (32,10) | Required | The real money amount won |
status |
String | Required | The status of the response Example: Success |
walletTx |
String(50) | Required | The wallet transaction ID Example: de73550e-0612-4a1b-8a0d-a5a3745b |
- The sum of `bonusmoneybet` and `realmoneybet` must equal the `betamount` sent by the provider - The sum of `bonusWin` and `realmoneyWin` must equal the `result` amount sent by the provider
Response Example
Success Response
{
"code": 200,
"status": "Success",
"walletTx": "aaaaaaa",
"balance": 100,
"bonusWin": 0,
"realmoneyWin": 0,
"bonusmoneybet": 0,
"realmoneybet": 5,
"bonus_balance": 50,
"real_balance": 50,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}Error Codes
The error codes are the same that are used in separate Wager and Result requests.