Result

Result

The game server uses this method to inform that the wager round is complete. The result 0 indicates that the player lost. Idempotency must be provided.

Info

**Note:** - Result requests may be received after the player goes offline - Result requests may be received without a prior wager request for FRB (free round bonus) and tournament auto-payout - For FRB results without a prior wager, the result represents the win from the free round

Responsibilities of the casino platform

The casino platform must:

  • Confirm that the incoming game session ID is valid and is connected with the given account ID
  • Check if a request with the same transactionid has been performed before:
    • If any of the essential fields transactionid, accountid, or betamount mismatch, the error Transaction parameter mismatch is returned
    • If there are no mismatches, the original response with the status 200 Success - duplicate request is returned. The only values that may change are the balance related parameters, since the player’s balance may have changed
  • Confirm that the incoming accountid and roundid match up with a previously placed wager. If this confirmation fails, refuse the result
  • A result must be accepted even if the game session has expired, since a result can be reported by the game server later. Groove provides the game session for you as information in this call
  • The only expected return code for a valid result call is success. All other return codes are unexpected and will result in the result attempt being resent. Return code 1000 Not logged on is never a valid response to a result call. The casino platform must accept the result even if the session has expired

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
device String Required The device currently used by the player
Valid values: desktop, mobile
frbid String(255) Optional* Free Round Bonus ID - Must be the templateId from FRB assign response
*Required for free round result transactions
Example: 123abc456 (the templateId from assign response)
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: result
result Decimal (32,10) Required The amount of money won by the player
If player did not win, value must be 0
Example: 2.25
roundid String(255) Required Round ID
Example: 802d1812c32686748f2afbcacfcc82114cf
transactionid String(255) Required Transaction ID
Example: 7617edd0924c11e7abb2865556898ad0

Request Examples

Regular Result (After Wager)

/groove?request=result&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completed

Free Round Result (No Prior Wager)

/groove?request=result&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completed&frbid=123abc456

**Free Round Result without Wager:** - Can be sent without a prior wager request - Must include `frbid` (the templateId from assign response) - The `result` amount represents the total 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 result
Examples: 500, 140.25
bonus_balance Decimal (32,10) Optional The player’s bonus balance
Example: 50.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
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
Warning

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": 10,
    "bonus_balance": 50,
    "real_balance": 50,
    "game_mode": 1,
    "order": "cash_money, bonus_money",
    "apiversion": "1.2"
}

Error Codes

Code Status Message
1 Technical error Technical error
110 Operation not allowed Reasons include:
• Result amount is less than 0
• User with specified accountId not found
• AccountId doesn’t match sessionId
• Game status is not pending or completed
400 Transaction operator mismatch Transaction operator mismatch
409 Round closed or transaction ID exists Round closed or transaction ID exists
1000 Not logged on Not logged on