Result
Result Transaction
The Result transaction is used to report the outcome of a game round and add any winnings to the player's balance.
Overview
The Result method is called by the game provider to inform the casino that a game round has completed and to report the outcome. If the player wins, the Result transaction adds the winning amount to the player’s balance. If the player loses, a result value of 0 is sent, indicating no additional funds should be added to the player’s balance.
- Result requests may be received after the player goes offline - Result requests may be received without a preceding wager request for Free Round Bonuses (FRB), tournament auto-payouts or similar scenarios - A game round may have multiple Result transactions, but only one with status "completed"
Flow Diagram
Casino Responsibilities
The casino platform must perform the following operations when processing a Result request:
-
Session Validation
- Confirm the incoming game session ID is valid
- Verify the session is associated with the provided account ID
-
Idempotency Check
- Check if a request with the same
transactionidhas been processed before - If any essential fields mismatch (
transactionid,accountid, orresult), return “Transaction parameter mismatch” - If no mismatches, return the original response with status “200 Success - duplicate request”
- Check if a request with the same
-
Round Validation
- Confirm that the incoming
accountidandroundidmatch a previously placed wager - For FRB or tournament payouts, a Result may be received without a previous Wager
- Confirm that the incoming
-
Session Expiry Handling
- A Result must be accepted even if the game session has expired
- Return code
1000 Not logged onis never a valid response to a Result call
-
Game Status Processing
- If
gamestatusis “completed”, mark the round as closed - If
gamestatusis “pending”, the round remains open for additional Result transactions
- If
Request Details
Endpoint
{casino_endpoint}?request=result&[parameters]
Request Parameters
| Parameter | Data type | Required | Description |
|---|---|---|---|
| accountid | String(60) - [0-9a-zA-Z] | Yes | Player’s unique identifier Example: 5179068 |
| apiversion | String | Yes | API version Example: 1.2 |
| device | String | Yes | Player’s device type Valid values: desktop, mobile |
| gameid | String | Yes | Groove game ID Example: 80102 |
| gamesessionid | String(64) | Yes | Game session ID Example: 11_99d71938-c2d9-4844-b950-d598c2es |
| gamestatus | String | Yes | Game status Valid values: completed, pending |
| request | String | Yes | Request method name Value: result |
| result | Decimal (32,10) | Yes | Win amount (0 if player lost) Example: 2.25 |
| roundid | String(255) | Yes | Round identifier Example: 802d1812c32686748f2afbcacfcc82114cf |
| transactionid | String(255) | Yes | Unique transaction identifier Example: 7617edd0924c11e7abb2865556898ad0re |
| frbid | String(255) | No | Free Round Bonus ID (if applicable) Example: 12a345b78 |
Example Request
GET {casino_endpoint}?request=result&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&roundid=nc8n4nd87&transactionid=trx_id&gamestatus=completedResponse Details
Response Parameters
| Parameter | Data type | Required | Description |
|---|---|---|---|
| apiversion | String | Yes | API version Example: 1.2 |
| balance | Decimal (32,10) | Yes | Total player balance (real + bonus) Examples: 500.00, 140.25 |
| bonus_balance | Decimal (32,10) | Yes | Player’s bonus balance Example: 50.00 |
| bonusWin | Decimal (32,10) | Yes | Portion of win allocated to bonus funds Example: 0.00 |
| code | Integer | Yes | Response code (see Appendix) Example: 200 |
| real_balance | Decimal (32,10) | Yes | Player’s real money balance Example: 100.00 |
| realMoneyWin | Decimal (32,10) | Yes | Portion of win allocated to real money Example: 10.00 |
| status | String | Yes | Response status (see Appendix) Example: Success |
| walletTx | String(50) | Yes | Casino’s wallet transaction ID Example: de73550e-0612-4a1b-8a0d-a5a3745b |
| game_mode | Integer | Yes* | Game mode:1 - Real money mode2 - Bonus mode*Required for CMA-compliant games |
| order | String | Yes* | Order type:cash_money - Real moneybonus_money - Bonus money*Required for CMA-compliant games |
**Note:** The sum of `bonusWin` and `realMoneyWin` must equal the total `result` amount specified in the request. If your casino does not use bonuses, set `bonusWin` to 0.
Example Success Response
{
"code": 200,
"status": "Success",
"walletTx": "de73550e-0612-4a1b-8a0d-a5a3745b",
"balance": 100.00,
"bonusWin": 0.00,
"realMoneyWin": 10.00,
"bonus_balance": 50.00,
"real_balance": 50.00,
"game_mode": 1,
"order": "cash_money",
"apiversion": "1.2"
}Error Handling
Common Error Codes
| Code | Status | Description |
|---|---|---|
| 1 | Technical error | Internal server error |
| 110 | Operation not allowed | This error occurs when: • The result amount is negative • Player account not found • Account ID doesn’t match session ID • Game status is invalid |
| 400 | Transaction operator mismatch | Transaction belongs to a different operator |
| 409 | Round closed or transaction ID exists | The round is already closed or this transaction ID has been used |
| 1000 | Not logged on | This should NOT be returned for Result transactions, even if the session has expired |
For a complete list of error codes, refer to [Appendix A: Transaction Response Status Codes](/appendix-a-transaction-response-status-codes/).
Implementation Notes
-
Game Status Handling:
pending- Indicates that the round is still in progress and more Result transactions may followcompleted- Indicates the round is finished and should be closed- A round can have multiple pending Results but only one completed Result
-
Idempotency Handling:
- Always store transaction IDs to identify duplicate requests
- Return the original response for duplicate transactions with the same transaction ID
- Only the balance fields may change in duplicate responses (as player balance may have changed due to other transactions)
-
Session Expiry:
- Result transactions MUST be processed even if the player’s session has expired
- This is crucial as Results may arrive significantly after the player has disconnected
- Never return
1000 Not logged onfor Result transactions
-
Free Round Bonus Results:
- For FRB games, a Result may be received without a matching Wager
- Include the
frbidparameter to identify which bonus the Result belongs to
-
Multiple Results in a Round:
- Some games (particularly live games) may send multiple Result transactions for a single round
- Only the final Result with
gamestatus=completedcloses the round
Security
When Signature Validation is enabled:
- Include the
X-Groove-Signatureheader in your request - Calculate signature using query parameters (excluding
request) - Include
frbidparameter if present (for free round bonuses) - See Signature Validation for detailed implementation
Signature Example
For the request:
GET {casino_endpoint}?request=result&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&roundid=nc8n4nd87&transactionid=trx_idQuery parameters for signature (alphabetically sorted):
accountid: “111”apiversion: “1.2”device: “desktop”gameid: “80102”gamesessionid: “123_jdhdujdk”result: “10.0”roundid: “nc8n4nd87”transactionid: “trx_id”
Concatenated values: 1111.2desktop80102123_jdhdujdk10.0nc8n4nd87trx_id
With security key "test_key", the signature would be:
X-Groove-Signature: d9655083f60cfd490f0ad882cb01ca2f9af61e669601bbb1dcced8a5dca1820fRelated Endpoints
- Wager - Used before a Result to place a bet
- Wager and Result - Combined operation for immediate bet and win
- Rollback on Result - Used to reverse a Result transaction if needed