Result

Result Transaction

Info

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.

Note

- 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

sequenceDiagram participant Player participant Game as Game Provider participant Tech Fusion as Tech Fusion Platform participant Casino as Casino Operator Player->>Game: Complete Game Round Game->>Tech Fusion: Result Request Tech Fusion->>Casino: Forward Result Request Casino->>Casino: Check Idempotency Casino->>Casino: Update Player Balance Casino->>Tech Fusion: Result Response Tech Fusion->>Game: Forward Response Game->>Player: Display Win Amount & Updated Balance Note over Player,Casino: If game status is "completed", the round is closed

Casino Responsibilities

The casino platform must perform the following operations when processing a Result request:

  1. Session Validation

    • Confirm the incoming game session ID is valid
    • Verify the session is associated with the provided account ID
  2. Idempotency Check

    • Check if a request with the same transactionid has been processed before
    • If any essential fields mismatch (transactionid, accountid, or result), return “Transaction parameter mismatch”
    • If no mismatches, return the original response with status “200 Success - duplicate request”
  3. Round Validation

    • Confirm that the incoming accountid and roundid match a previously placed wager
    • For FRB or tournament payouts, a Result may be received without a previous Wager
  4. Session Expiry Handling

    • A Result must be accepted even if the game session has expired
    • Return code 1000 Not logged on is never a valid response to a Result call
  5. Game Status Processing

    • If gamestatus is “completed”, mark the round as closed
    • If gamestatus is “pending”, the round remains open for additional Result transactions

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 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=completed

Response 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 mode
2 - Bonus mode
*Required for CMA-compliant games
order String Yes* Order type:
cash_money - Real money
bonus_money - Bonus money
*Required for CMA-compliant games
Note

**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
Tip

For a complete list of error codes, refer to [Appendix A: Transaction Response Status Codes](/appendix-a-transaction-response-status-codes/).

Implementation Notes

  1. Game Status Handling:

    • pending - Indicates that the round is still in progress and more Result transactions may follow
    • completed - Indicates the round is finished and should be closed
    • A round can have multiple pending Results but only one completed Result
  2. 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)
  3. 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 on for Result transactions
  4. Free Round Bonus Results:

    • For FRB games, a Result may be received without a matching Wager
    • Include the frbid parameter to identify which bonus the Result belongs to
  5. 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=completed closes the round

Security

When Signature Validation is enabled:

  1. Include the X-Groove-Signature header in your request
  2. Calculate signature using query parameters (excluding request)
  3. Include frbid parameter if present (for free round bonuses)
  4. 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_id

Query 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: d9655083f60cfd490f0ad882cb01ca2f9af61e669601bbb1dcced8a5dca1820f