Transaction API

Transaction API

Info

The Transaction API is the core component of the Groove platform, handling all financial interactions between games and the casino operator's wallet system.

Overview

The Transaction API facilitates real-time financial transactions between game providers and casino operators. It ensures secure, reliable, and auditable money movement for all player activities including wagers, wins, and promotional bonuses.

Every transaction is processed through standardized API calls that follow strict protocols for security, idempotency, and reconciliation. The API delivers fast, reliable, one-to-one interactions with predictable outcomes for both players and operators.

Transaction Endpoints

Base URL: https://{CasinoEndpoint}

HTTP Method: GET

Response Format: All responses are returned in JSON format

Transaction Flow

The transaction flow follows a logical sequence based on player actions within a game:

sequenceDiagram participant Player participant Game as Game Provider participant Groove as Groove Platform participant Casino as Casino Operator Note over Player,Casino: Session Initialization Game->>Groove: Get Account Request Groove->>Casino: Forward Get Account Request Casino->>Groove: Account Validation Response Groove->>Game: Forward Account Response Game->>Groove: Get Balance Request Groove->>Casino: Forward Get Balance Request Casino->>Groove: Balance Response Groove->>Game: Forward Balance Note over Player,Casino: Gameplay Transactions Player->>Game: Place Bet Game->>Groove: Wager Request Groove->>Casino: Forward Wager Request Casino->>Groove: Wager Response (Updated Balance) Groove->>Game: Forward Wager Response Game->>Player: Display Bet Placement Player->>Game: Complete Game Round Game->>Groove: Result Request Groove->>Casino: Forward Result Request Casino->>Groove: Result Response (Updated Balance) Groove->>Game: Forward Result Response Game->>Player: Display Outcome & Balance alt Error Occurs Game->>Groove: Rollback Request Groove->>Casino: Forward Rollback Request Casino->>Groove: Rollback Response Groove->>Game: Forward Rollback Response Game->>Player: Display Correction end alt Jackpot Win Game->>Groove: Jackpot Request Groove->>Casino: Forward Jackpot Request Casino->>Groove: Jackpot Response Groove->>Game: Forward Jackpot Response Game->>Player: Display Jackpot Win end

Transaction Types

The Transaction API supports several types of operations:

Security Features

Authentication & Information Requests

  • Get Account: Validates player information and session status
  • Get Balance: Retrieves current player balance from the operator’s wallet

Financial Transactions

  • Wager: Deducts funds from player balance for placing a bet
  • Result: Adds winnings to player balance after game round completion
  • Wager and Result: Combined operation for immediate bet and result processing
  • Jackpot: Processes special jackpot wins
  • Rollback: Reverses a previous wager transaction

Sportsbook Features

Implementation Guidelines

When implementing the Transaction API, follow these best practices:

  1. Idempotency: Always implement proper idempotency handling using transaction IDs to prevent duplicate processing
  2. Round Management: Ensure all rounds are properly closed with a ‘completed’ status
  3. Error Handling: Implement comprehensive error handling with appropriate response codes
  4. Reconciliation: Maintain detailed transaction logs for reconciliation purposes
  5. Security: Validate all incoming requests using secure authentication methods
  6. Signature Validation: Consider implementing HMAC-SHA256 signature validation for enhanced request authentication
Warning

All casino implementations must properly handle duplicate transactions. If the same transaction ID is received multiple times, return the original response with status "Success - duplicate request".

Next Steps

Review the documentation for each transaction type to understand the specific parameters, request formats, and response structures required for implementation. Start with the Get Account and Get Balance endpoints which form the foundation of all player interactions.

Subsections of Transaction API

Signature Validation

Game Transaction Security Header

Overview

The Transaction API supports an optional security feature using HMAC-SHA256 cryptographic signatures to ensure request authenticity and prevent tampering. When enabled, all transaction requests must include a valid signature in the X-Groove-Signature header.

Info

This security feature is optional and must be enabled by your account manager. Once enabled, all transaction API requests must include the signature header.

Supported Endpoints

The signature validation applies to all transaction endpoints:

  • GetAccount - Validate player session
  • GetBalance - Retrieve player balance
  • Wager - Process bet placement
  • Result - Process game outcome
  • WagerAndResult - Combined bet and result
  • Jackpot - Process jackpot wins
  • Rollback - Reverse transactions
  • ReverseWin - Reverse win transactions
  • RollbackRollback - Reverse rollback operations
  • WagerByBatch - Process batch betting (POST request)

Setup

1. Security Key Provision

Your account manager will provide a unique security key for generating HMAC-SHA256 signatures. This key must be kept secure and never exposed in client-side code.

2. Header Inclusion

All requests must include the signature in the request header:

X-Groove-Signature: <generated_signature>

Hash Creation Process

Step 1: Parameter Concatenation

Concatenate all query parameter values (not names) in lexicographical order based on the parameter names:

Warning

**Important Rules:** - Sort parameters alphabetically by their **names** - Concatenate only the **values** (not the names) - **Exclude** the `request` query parameter - Treat `nogsgameid` as `gameid` for sorting purposes - Include `frbId` parameter for free spin requests (Result, Wager, WagerAndResult) - For WagerByBatch (POST), use only query parameters, not the request body

Step 2: Generate HMAC-SHA256

Use the concatenated string and your security key to generate the HMAC-SHA256 signature:

signature = HMAC_SHA256(concatenated_values, security_key)

Signature Validation Flow

flowchart TD A[Game sends request with X-Groove-Signature header] --> B[Groove receives request] B --> C[Extract query parameters] C --> D[Sort parameters alphabetically] D --> E[Concatenate values] E --> F[Generate HMAC-SHA256 with security key] F --> G{Signature matches header?} G -->|Yes| H[Process transaction] G -->|No| I[Return error 1001] H --> J[Return success response] I --> K[Invalid signature response] style I fill:#f96 style K fill:#f96 style H fill:#9f6 style J fill:#9f6

Error Response

If signature validation fails, the server returns:

{
    "code": 1001,
    "status": "Invalid signature",
    "message": "invalid signature"
}

Implementation Examples

Python

import hmac
import hashlib
from urllib.parse import urlparse, parse_qs

def generate_signature(url, security_key):
    # Parse URL and extract query parameters
    parsed = urlparse(url)
    params = parse_qs(parsed.query)
    
    # Create parameter dictionary (handle single values)
    param_dict = {}
    for key, value_list in params.items():
        # Skip 'request' parameter
        if key == 'request':
            continue
        # Treat 'nogsgameid' as 'gameid' for sorting
        sort_key = 'gameid' if key == 'nogsgameid' else key
        param_dict[sort_key] = value_list[0] if value_list else ''
    
    # Sort parameters alphabetically and concatenate values
    sorted_params = sorted(param_dict.items())
    concatenated = ''.join([value for key, value in sorted_params])
    
    # Generate HMAC-SHA256
    signature = hmac.new(
        security_key.encode('utf-8'),
        concatenated.encode('utf-8'),
        hashlib.sha256
    ).hexdigest()
    
    return signature

# Example usage
security_key = "test_key"
url = "/groove?request=wager&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=10.0&roundid=nc8n4nd87&transactionid=trx_id"
signature = generate_signature(url, security_key)
print(f"X-Groove-Signature: {signature}")

Golang

package main

import (
    "crypto/hmac"
    "crypto/sha256"
    "encoding/hex"
    "net/url"
    "sort"
    "strings"
)

func generateSignature(requestURL string, securityKey string) string {
    // Parse URL
    u, _ := url.Parse(requestURL)
    params := u.Query()
    
    // Create parameter map for sorting
    paramMap := make(map[string]string)
    for key, values := range params {
        // Skip 'request' parameter
        if key == "request" {
            continue
        }
        // Treat 'nogsgameid' as 'gameid' for sorting
        sortKey := key
        if key == "nogsgameid" {
            sortKey = "gameid"
        }
        if len(values) > 0 {
            paramMap[sortKey] = values[0]
        }
    }
    
    // Sort keys alphabetically
    var keys []string
    for k := range paramMap {
        keys = append(keys, k)
    }
    sort.Strings(keys)
    
    // Concatenate values in sorted order
    var concatenated strings.Builder
    for _, key := range keys {
        concatenated.WriteString(paramMap[key])
    }
    
    // Generate HMAC-SHA256
    h := hmac.New(sha256.New, []byte(securityKey))
    h.Write([]byte(concatenated.String()))
    signature := hex.EncodeToString(h.Sum(nil))
    
    return signature
}

// Example usage
func main() {
    securityKey := "test_key"
    url := "/groove?request=wager&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=10.0&roundid=nc8n4nd87&transactionid=trx_id"
    signature := generateSignature(url, securityKey)
    fmt.Printf("X-Groove-Signature: %s\n", signature)
}

Java

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;

public class GrooveSignature {
    
    public static String generateSignature(String url, String securityKey) throws Exception {
        // Parse query parameters
        String query = url.substring(url.indexOf("?") + 1);
        Map<String, String> params = new LinkedHashMap<>();
        
        for (String param : query.split("&")) {
            String[] keyValue = param.split("=");
            String key = URLDecoder.decode(keyValue[0], StandardCharsets.UTF_8.name());
            String value = keyValue.length > 1 ? 
                URLDecoder.decode(keyValue[1], StandardCharsets.UTF_8.name()) : "";
            
            // Skip 'request' parameter
            if (!key.equals("request")) {
                // Treat 'nogsgameid' as 'gameid' for sorting
                String sortKey = key.equals("nogsgameid") ? "gameid" : key;
                params.put(sortKey, value);
            }
        }
        
        // Sort parameters alphabetically
        Map<String, String> sortedParams = new TreeMap<>(params);
        
        // Concatenate values
        StringBuilder concatenated = new StringBuilder();
        for (String value : sortedParams.values()) {
            concatenated.append(value);
        }
        
        // Generate HMAC-SHA256
        Mac mac = Mac.getInstance("HmacSHA256");
        SecretKeySpec secretKey = new SecretKeySpec(
            securityKey.getBytes(StandardCharsets.UTF_8), 
            "HmacSHA256"
        );
        mac.init(secretKey);
        byte[] hash = mac.doFinal(concatenated.toString().getBytes(StandardCharsets.UTF_8));
        
        // Convert to hex string
        StringBuilder hexString = new StringBuilder();
        for (byte b : hash) {
            String hex = Integer.toHexString(0xff & b);
            if (hex.length() == 1) hexString.append('0');
            hexString.append(hex);
        }
        
        return hexString.toString();
    }
    
    // Example usage
    public static void main(String[] args) throws Exception {
        String securityKey = "test_key";
        String url = "/groove?request=wager&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=10.0&roundid=nc8n4nd87&transactionid=trx_id";
        String signature = generateSignature(url, securityKey);
        System.out.println("X-Groove-Signature: " + signature);
    }
}

Example Signatures

Using security key: "test_key"

Request Type URL Concatenated Values Signature
GetAccount /groove?request=getaccount&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&apiversion=1.2 1111.2desktop123_jdhdujdk be426d042cd71743970779cd6ee7881d71d1f0eb769cbe14a0081c29c8ef2a09
GetBalance /groove?request=getbalance&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&nogsgameid=80102&apiversion=1.2 1111.2desktop80102123_jdhdujdk 434e2b4545299886c8891faadd86593ad8cbf79e5cd20a6755411d1d3822abba
Wager /groove?request=wager&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=10.0&roundid=nc8n4nd87&transactionid=trx_id 1111.210.0desktop80102123_jdhdujdkwagernc8n4nd87trx_id f6d980dfe7866b6676e6565ccca239f527979d702106233bb6f72a654931b3bc
WagerAndResult /groove?request=wagerAndResult&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&roundid=nc8n4nd87&transactionid=trx_id 1111.2desktop80102123_jdhdujdkwagerAndResult10.0nc8n4nd87trx_id bba4df598cf50ec69ebe144c696c0305e32f1eef76eb32091585f056fafd9079
Result /groove?request=result&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&result=10.0&roundid=nc8n4nd87&transactionid=trx_id 1111.2desktop80102123_jdhdujdkresult10.0nc8n4nd87trx_id d9655083f60cfd490f0ad882cb01ca2f9af61e669601bbb1dcced8a5dca1820f
Rollback /groove?request=rollback&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&rollbackamount=10.0&roundid=nc8n4nd87&transactionid=trx_id 1111.2desktop80102123_jdhdujdkrollback10.0nc8n4nd87trx_id 5ecbc1d5c6bd0ad172c859da01cb90746a61942bdf6f878793a80af7539719e5
Jackpot /groove?request=jackpot&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&amount=10.0&roundid=nc8n4nd87&transactionid=trx_id 11110.01.2desktop80102123_jdhdujdkjackpotnc8n4nd87trx_id d4cc7c2a2ed2f33657e2c24e0c32c5ead980f793e2ce81eb00316f0544a45048
ReverseWin /groove?request=reversewin&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&amount=10.0&roundid=nc8n4nd87&transactionid=trx_id&wintransactionid=win_trx_id&apiversion=1.2 11110.01.2desktop80102123_jdhdujdkreversewinnc8n4nd87trx_idwin_trx_id 0e96af62a1fee9e6dfbdbda06bc068a6cf2eb18152e02e39c3af70aecb5d04d7
RollbackRollback /groove?request=rollbackrollback&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&rollbackAmount=10.0&roundid=nc8n4nd87&transactionid=trx_id&apiversion=1.2 1111.2desktop80102123_jdhdujdkrollbackrollback10.0nc8n4nd87trx_id ecaeae75702f548f788c92c06804e59d11719a70302704b36ef72d607e180327
WagerByBatch POST /groove?request=wagerbybatch&request_id=batch_001&gamesessionid=1501_xyz&gameid=82602&apiversion=1.2 1.2826021501_xyzbatch_001 8a5d4e9f3b2c1a7e6d5c4b3a2918f7e6d5c4b3a2918f7e6d5c4b3a2918f7e6
Tip

**Free Spin Requests**: For Result, Wager, and WagerAndResult endpoints, when processing free spin requests, include the `frbId` parameter in the signature calculation. **WagerByBatch**: This is a POST request. Only query parameters are used for signature calculation - the JSON request body is NOT included in the signature.

Security Best Practices

  1. Key Management

    • Store security keys in secure configuration management systems
    • Never hardcode keys in source code
    • Rotate keys periodically
    • Use different keys for different environments (staging, production)
  2. Implementation Security

    • Always validate signatures server-side
    • Implement request timeout mechanisms
    • Log all signature validation failures for security monitoring
    • Use HTTPS for all API communications
  3. Error Handling

    • Never expose security keys in error messages
    • Log detailed errors server-side for debugging
    • Return generic error messages to clients
  4. Testing

    • Test with the provided example signatures
    • Verify parameter sorting logic thoroughly
    • Test edge cases (empty values, special characters)
    • Validate handling of the nogsgameid to gameid conversion

Troubleshooting

Common Issues

Issue Solution
Signature mismatch Verify parameter sorting order and that ‘request’ parameter is excluded
Special characters Ensure proper URL decoding before concatenation
nogsgameid parameter Remember to treat as ‘gameid’ for sorting
Empty parameter values Include empty strings in concatenation
Case sensitivity Parameter names are case-sensitive

Debugging Steps

  1. Log the concatenated string before hashing
  2. Verify the security key is correct
  3. Check parameter extraction and sorting
  4. Ensure proper character encoding (UTF-8)
  5. Validate the HMAC-SHA256 implementation

Migration Guide

If you’re migrating from an unsecured implementation:

  1. Phase 1: Implement signature generation in your application
  2. Phase 2: Test with provided examples in staging environment
  3. Phase 3: Enable signature validation with your account manager
  4. Phase 4: Deploy to production with monitoring
  5. Phase 5: Monitor error rates and adjust as needed
Warning

Once signature validation is enabled, all requests without valid signatures will be rejected. Ensure your implementation is thoroughly tested before enabling this feature in production.

Get Account

Get Account

Info

The Get Account endpoint retrieves player profile information required for gameplay, including unique ID, currency, location, and account balances.

Overview

The Get Account method is typically the first transaction API call made when a player launches a game. It verifies the player’s session and returns essential player details needed for the game to function correctly. Game providers use this information to configure the game session, set currency display, and initialize the player’s balance.

Flow Diagram

sequenceDiagram participant Player participant Game as Game Provider participant Groove as Groove Platform participant Casino as Casino Operator Player->>Game: Launch Game Game->>Groove: Get Account Request Groove->>Casino: Forward Get Account Request Casino->>Casino: Validate Session Casino->>Casino: Retrieve Player Details Casino->>Groove: Player Account Response Groove->>Game: Forward Account Response Game->>Player: Initialize Game with Player Settings

Casino Responsibilities

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

  1. Session Validation

    • Confirm the incoming game session ID is valid
    • Verify the session is associated with the provided account ID
    • Reject the request if validation fails
  2. Player Data Retrieval

    • Return consistent player identifiers for the same player across sessions
    • Provide accurate player location information
    • Return the current player balances (real money and bonus)
    • Include the correct currency setting for the player
  3. Consistency Requirements

    • The account ID must be unique per player and consistent across sessions
    • This is particularly important for retry and rollback operations

Request Details

Endpoint

{casino_endpoint}?request=getaccount&[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
gamesessionid String(64) Yes Game session ID
Example: 11_99d71938-c2d9-4844-b950-d598c2es
request String Yes Request method name
Value: getaccount

Example Request

GET {casino_endpoint}?request=getaccount&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&apiversion=1.2

Response Details

Response Parameters

Parameter Data type Required Description
accountid String Yes Player’s unique identifier
Example: 5179068
apiversion String Yes API version
Example: 1.2
city String(32) Yes Player’s city location
Examples: London, Tel Aviv
code Integer Yes Response code (see Appendix)
Example: 200
country String Yes Player’s country (ISO 3166-1 alpha-2 code)
Examples: IL, UK, US
currency String Yes Player’s currency (ISO 4217 code)
Example: EUR
gamesessionid String(64) Yes Game session ID (should be the same as in game launch)
Example: 11_99d71938-c2d9-4844-b950-d598c2es
real_balance Decimal (32,10) with max 2 decimal places Yes Player’s real money balance
Example: 100.00
bonus_balance Decimal (32,10) with max 2 decimal places Yes Player’s bonus balance
Example: 50.00
status String Yes Response status (see Appendix)
Example: Success
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 on Cryptocurrencies**: For Fugaso game provider, the following cryptocurrencies are also supported: BTC, LTC, DOG, ETH, BCH, USDT, and XRP.

Example Success Response

{
  "code": 200,
  "status": "Success",
  "accountid": "8877",
  "city": "London",
  "country": "GB",
  "currency": "EUR",
  "gamesessionid": "11_99d71938-c2d9-4844-b950-d598c2es",
  "real_balance": 100.00,
  "bonus_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
1000 Not logged on Player session is invalid or expired
1003 Authentication failed Invalid session credentials or account mismatch
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. Player Identification:

    • The accountid must be consistent for the same player across different sessions
    • This consistency is crucial for transaction reconciliation and player tracking
  2. Location Information:

    • The country parameter uses ISO 3166-1 alpha-2 country codes (e.g., US, GB, DE)
    • Location data is used for regulatory compliance and localization
  3. Currency Handling:

    • The currency parameter uses ISO 4217 currency codes (e.g., EUR, USD, GBP)
    • Cryptocurrency support varies by game provider
    • Games will display monetary values in the specified currency format
  4. CMA Compliance:

    • For UK Gambling Commission (UKGC) regulated operators, game_mode and order parameters are required
    • These parameters control how funds are consumed for wagers (real money vs. bonus money)

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. See Signature Validation for detailed implementation

Signature Example

For the request:

GET {casino_endpoint}?request=getaccount&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&apiversion=1.2

Query parameters for signature (alphabetically sorted):

  • accountid: “111”
  • apiversion: “1.2”
  • device: “desktop”
  • gamesessionid: “123_jdhdujdk”

Concatenated values: 1111.2desktop123_jdhdujdk

With security key "test_key", the signature would be:

X-Groove-Signature: be426d042cd71743970779cd6ee7881d71d1f0eb769cbe14a0081c29c8ef2a09
  • Get Balance - Retrieves current player balance
  • Wager - Places a bet and updates player balance
  • Result - Updates player balance after a game round completes

Get Balance

Get Balance

Info

The Get Balance endpoint retrieves the current balance for a player's account. This is used by games to display the player's up-to-date balance during gameplay.

Overview

The Get Balance method allows game providers to request the current balance for a specific player. This is typically called at various points during gameplay to ensure the player’s displayed balance is accurate. The casino returns both the real money balance and any bonus funds available to the player.

Flow Diagram

sequenceDiagram participant Player participant Game as Game Provider participant Groove as Groove Platform participant Casino as Casino Operator Note over Player,Game: Player views balance in game Game->>Groove: Get Balance Request Groove->>Casino: Forward Get Balance Request Casino->>Casino: Validate Session Casino->>Casino: Retrieve Current Balance Casino->>Groove: Balance Response Groove->>Game: Forward Balance Response Game->>Player: Display Updated Balance

Casino Responsibilities

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

  1. Session Validation

    • Confirm the incoming game session ID is valid
    • Verify the session is associated with the provided account ID
    • Reject the request if validation fails
  2. Balance Retrieval

    • Retrieve the player’s current real money balance
    • Retrieve the player’s current bonus balance (if applicable)
    • Calculate the total balance (real + bonus)
  3. Response Formatting

    • Return all balance values with consistent decimal precision
    • Include any required CMA-compliance parameters if applicable

Request Details

Endpoint

{casino_endpoint}?request=getbalance&[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
gamesessionid String(64) Yes Game session ID
Example: 11_99d71938-c2d9-4844-b950-d598c2es
nogsgameid String Yes Groove game ID
Example: 80102
request String Yes Request method name
Value: getbalance

Example Request

GET {casino_endpoint}?request=getbalance&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&nogsgameid=80102&apiversion=1.2

Response Details

Response Parameters

Parameter Data type Required Description
apiversion String Yes API version
Example: 1.2
balance Decimal (32,10) with max 2 decimal places Yes Total player balance (real + bonus)
Examples: 500.00, 140.25
bonus_balance Decimal (32,10) with max 2 decimal places Yes Player’s bonus balance
Example: 50.00
code Integer Yes Response code (see Appendix)
Example: 200
real_balance Decimal (32,10) with max 2 decimal places Yes Player’s real money balance
Example: 100.00
status String Yes Response status (see Appendix)
Example: Success
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 `balance` value must always equal the sum of `real_balance` and `bonus_balance`.

Example Success Response

{
  "code": 200,
  "status": "Success",
  "balance": 100.00,
  "bonus_balance": 50.00,
  "real_balance": 50.00,
  "game_mode": 1,
  "order": "cash_money",
  "apiversion": "1.2"
}

Example Error Response

{
  "code": 1,
  "status": "Technical error",
  "message": "Technical error",
  "apiversion": "1.2"
}

Error Handling

Common Error Codes

Code Status Description
1 Technical error Internal server error
110 Operation not allowed Invalid session or account ID
1000 Not logged on Player session is invalid or 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. Balance Calculation:

    • The balance value must equal the sum of real_balance and bonus_balance
    • For casinos that don’t use bonus balances, set bonus_balance to 0.00
  2. Frequency of Calls:

    • Games typically call Get Balance after every significant player action
    • Balance may be polled periodically during gameplay
    • Balance should always be refreshed after financial transactions (wagers, results)
  3. Error Handling:

    • If a player’s session has expired, return code 1000 Not logged on
    • This allows the game to prompt the player to log in again if needed
  4. Balance Fields:

    • All balance fields should be returned (balance, bonus_balance, real_balance)

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. Remember to treat nogsgameid as gameid for sorting purposes
  4. See Signature Validation for detailed implementation

Signature Example

For the request:

GET {casino_endpoint}?request=getbalance&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&nogsgameid=80102&apiversion=1.2

Query parameters for signature (alphabetically sorted, treating nogsgameid as gameid):

  • accountid: “111”
  • apiversion: “1.2”
  • device: “desktop”
  • gameid (from nogsgameid): “80102”
  • gamesessionid: “123_jdhdujdk”

Concatenated values: 1111.2desktop80102123_jdhdujdk

With security key "test_key", the signature would be:

X-Groove-Signature: 434e2b4545299886c8891faadd86593ad8cbf79e5cd20a6755411d1d3822abba
  • Get Account - Retrieves player account information
  • Wager - Updates player balance when placing a bet
  • Result - Updates player balance after a game round completes

Wager

Wager Transaction

Info

The Wager transaction is used to place a bet on behalf of a player. This transaction deducts funds from the player's balance at the casino.

Overview

The Wager method represents a player placing a bet in a game. When a player initiates a betting action, the game provider sends a Wager request to the Groove platform, which then forwards it to the casino operator. The casino processes the request by validating the player’s session, checking available funds, and updating the player’s balance accordingly.

Warning

**Important:** Wager requests implement idempotency controls. This means the same wager request should only be processed once. If a duplicate request is received, the system must return the original response with status code 200 and the " Success - duplicate request" status.

Flow Diagram

sequenceDiagram participant Player participant Game as Game Provider participant Groove as Groove Platform participant Casino as Casino Operator Player->>Game: Place Bet Game->>Groove: Wager Request Groove->>Casino: Forward Wager Request Casino->>Casino: Validate Session Casino->>Casino: Check Available Funds Casino->>Casino: Check Gaming Limits Casino->>Casino: Check Idempotency Casino->>Casino: Update Balance Casino->>Groove: Wager Response Groove->>Game: Forward Response Game->>Player: Display Updated Balance

Casino Responsibilities

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

  1. Session Validation

    • Confirm the incoming game session ID is valid
    • Verify the session is associated with the provided account ID
    • Reject the wager if validation fails
  2. Transaction Validation

    • Verify sufficient funds are available
    • Check that the player is within responsible gaming limits
    • Determine if the transaction has already been processed
  3. Idempotency Check

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

    • Store transaction details to handle future Result and Rollback calls
    • Important fields to store: gamesessionid, accountid, roundid, transactionid, and betamount

Request Details

Endpoint

{casino_endpoint}?request=wager&[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
betamount Decimal (32,10) Yes Wager amount (real + bonus funds)
Examples: 2.00, 0.40, 0.01
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 from start game method
Example: 11_99d71938-c2d9-4844-b950-d598c2es
request String Yes Request method name
Value: wager
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=wager&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=10.0&roundid=nc8n4nd87&transactionid=trx_id

Response Details

Response Parameters

Parameter Data type Required Description
accounttransactionid String(50) Yes Casino’s internal transaction ID
Example: 7617edd0924c11e7abb2865556898ad0
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
bonusmoneybet Decimal (32,10) Yes Portion of bet from 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
realmoneybet Decimal (32,10) Yes Portion of bet from real money
Example: 10.00
status String Yes Response status (see Appendix)
Example: Success
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 `bonusmoneybet` and `realmoneybet` must equal the total `betamount` specified in the request. If your casino does not use bonuses, set `bonusmoneybet` to 0.

Example Success Response

{
  "code": 200,
  "status": "Success",
  "accounttransactionid": "aaaaaaa",
  "balance": 100.00,
  "bonusmoneybet": 0.00,
  "realmoneybet": 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 wager amount is negative
• Player account not found
• Account ID doesn’t match session ID
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 Player session is invalid or expired
1006 Out of money Insufficient funds to place the wager
1019 Gaming limit Player has exceeded betting limits:
• Loss limit exceeded
• Overall bet limit exceeded
1035 Account blocked Player account is suspended or blocked
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. 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)
  2. Transaction Storage:

    • Store wager details to validate future Result and Rollback calls
    • Key data includes: session ID, account ID, round ID, transaction ID, and bet amount
  3. Error Handling:

    • Return appropriate error codes based on validation results
    • Include detailed error messages for troubleshooting
  4. Free Round Bonuses:

    • If the wager is part of a Free Round Bonus, include the frbid parameter
    • For FRB wagers, the bet amount is typically 0 in real money mode

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=wager&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=10.0&roundid=nc8n4nd87&transactionid=trx_id

Query parameters for signature (alphabetically sorted):

  • accountid: “111”
  • apiversion: “1.2”
  • betamount: “10.0”
  • device: “desktop”
  • gameid: “80102”
  • gamesessionid: “123_jdhdujdk”
  • roundid: “nc8n4nd87”
  • transactionid: “trx_id”

Concatenated values: 1111.210.0desktop80102123_jdhdujdknc8n4nd87trx_id

With security key "test_key", the signature would be:

X-Groove-Signature: f6d980dfe7866b6676e6565ccca239f527979d702106233bb6f72a654931b3bc
  • Result - Used after a wager to add winnings to the player’s balance
  • Wager and Result - Combined operation for immediate bet and win
  • Rollback - Used to reverse a wager transaction if needed

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 Groove as Groove Platform participant Casino as Casino Operator Player->>Game: Complete Game Round Game->>Groove: Result Request Groove->>Casino: Forward Result Request Casino->>Casino: Check Idempotency Casino->>Casino: Update Player Balance Casino->>Groove: Result Response Groove->>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 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=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

Wager And Result

Wager And Result Transaction

Info

The Wager And Result transaction combines the Wager and Result operations into a single call, allowing a bet to be placed and the outcome reported simultaneously.

Overview

The Wager And Result method is an optimization that allows game providers to perform both a wager and a result operation in a single transaction. This is particularly useful for instant games where the outcome is determined immediately after the player places a bet, such as scratch cards or simple slot spins.

By combining these operations, the game can reduce latency and network traffic, resulting in a smoother player experience. Like individual Wager and Result transactions, Wager And Result implements idempotency controls to prevent duplicate processing.

Warning

**Important:** Wager And Result requests implement idempotency controls. If a duplicate request is received with the same transaction ID, the system must return the original response with status code 200 and the "Success - duplicate request" status.

Flow Diagram

sequenceDiagram participant Player participant Game as Game Provider participant Groove as Groove Platform participant Casino as Casino Operator Player->>Game: Place Bet & Complete Game Round Game->>Groove: Wager And Result Request Groove->>Casino: Forward Wager And Result Request Casino->>Casino: Validate Session Casino->>Casino: Check Available Funds Casino->>Casino: Check Idempotency Casino->>Casino: Process Wager Casino->>Casino: Process Result Casino->>Casino: Update Final Balance Casino->>Groove: Wager And Result Response Groove->>Game: Forward Response Game->>Player: Display Outcome & Updated Balance

Casino Responsibilities

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

  1. Session Validation

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

    • Verify sufficient funds are available for the wager
    • Check that the player is within responsible gaming limits
    • Determine if the transaction has already been processed
  3. Idempotency Check

    • Check if a request with the same transactionid has been processed before
    • If any essential fields mismatch, return “Transaction operator mismatch”
    • If no mismatches, return the original response with status “200 Success - duplicate request”
  4. Transaction Processing

    • Process the wager (deduct the bet amount from player balance)
    • Process the result (add the win amount to player balance)
    • Calculate the final player balance

Request Details

Endpoint

/groove?request=wagerAndResult&[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
betamount Decimal (32,10) Yes Wager amount (real + bonus funds)
Examples: 2.00, 0.40, 0.01
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: wagerAndResult
result Decimal (32,10) Yes Win amount
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=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=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
bonusmoneybet Decimal (32,10) Yes Portion of bet from bonus funds
Example: 0.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
realmoneybet Decimal (32,10) Yes Portion of bet from real money
Example: 5.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 `bonusmoneybet` and `realmoneybet` must equal the total `betamount` specified in the request. Similarly, the sum of `bonusWin` and `realMoneyWin` must equal the total `result` amount. If your casino does not use bonuses, set `bonusmoneybet` and `bonusWin` to 0.

Example Success Response

{
  "code": 200,
  "status": "Success",
  "walletTx": "de73550e-0612-4a1b-8a0d-a5a3745b",
  "balance": 105.00,
  "bonusWin": 0.00,
  "realMoneyWin": 10.00,
  "bonusmoneybet": 0.00,
  "realmoneybet": 5.00,
  "bonus_balance": 50.00,
  "real_balance": 55.00,
  "game_mode": 1,
  "order": "cash_money",
  "apiversion": "1.2"
}

Error Handling

Common Error Codes

The error codes for Wager And Result are the same as those used in the individual Wager and Result transactions.

Code Status Description
1 Technical error Internal server error
110 Operation not allowed Invalid session, account, negative amount, etc.
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 Player session is invalid or expired
1006 Out of money Insufficient funds to place the wager
1019 Gaming limit Player has exceeded betting limits
1035 Account blocked Player account is suspended or blocked
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. Use Cases:

    • Instant win games (scratch cards, simple slots)
    • Games where the outcome is determined immediately after the bet
    • Optimizations to reduce latency and improve player experience
  2. Idempotency Handling:

    • 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
  3. Balance Calculation:

    • The final balance should reflect both the wager deduction and result addition
    • Example: Initial balance 100.00, bet 5.00, win 10.00, final balance 105.00
  4. Game Status:

    • If gamestatus is “completed”, mark the round as closed
    • If gamestatus is “pending”, the round remains open for additional Result transactions
  5. Free Round Bonus:

    • For FRB games, the betamount is typically 0
    • Include the frbid parameter to identify which bonus is being used

Advantages Over Separate Calls

  1. Reduced Latency: Single network round-trip instead of two
  2. Simplified Error Handling: One transaction to track and manage
  3. Atomic Operation: Either both wager and result succeed, or neither does
  4. Improved Player Experience: Faster game play with immediate results

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=wagerAndResult&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&betamount=10.0&result=10.0&roundid=nc8n4nd87&transactionid=trx_id

Query parameters for signature (alphabetically sorted):

  • accountid: “111”
  • apiversion: “1.2”
  • betamount: “10.0”
  • device: “desktop”
  • gameid: “80102”
  • gamesessionid: “123_jdhdujdk”
  • result: “10.0”
  • roundid: “nc8n4nd87”
  • transactionid: “trx_id”

Concatenated values: 1111.210.0desktop80102123_jdhdujdk10.0nc8n4nd87trx_id

With security key "test_key", the signature would be:

X-Groove-Signature: bba4df598cf50ec69ebe144c696c0305e32f1eef76eb32091585f056fafd9079
  • Wager - Separate endpoint for placing a bet
  • Result - Separate endpoint for reporting game outcome
  • Rollback - Used to reverse a transaction if needed

Rollback

Rollback Transaction

Info

The Rollback transaction is used to reverse a previous wager transaction, typically when an error occurs during gameplay or when a wager should be cancelled.

Overview

The Rollback method allows game providers to reverse a previously made wager. This is commonly used in error scenarios, such as when a network issue occurs after a player places a bet but before the game round completes. By rolling back the wager, the player’s funds are returned to their account, ensuring they are not charged for a game round that did not complete properly.

Note

Not all game providers support rollbacks. Game providers implement different rollback behaviors based on their platform architecture and game mechanics.

Some game providers require specialized rollback implementations. For example, Sports Book providers typically require support for both Rollback on Result and Rollback on Rollback operations in addition to the standard Rollback.

Flow Diagram

sequenceDiagram participant Player participant Game as Game Provider participant Groove as Groove Platform participant Casino as Casino Operator Note over Game,Casino: Error scenario after wager Game->>Groove: Rollback Request Groove->>Casino: Forward Rollback Request Casino->>Casino: Validate Transaction Details Casino->>Casino: Check Idempotency Casino->>Casino: Find Original Wager Casino->>Casino: Verify Rollback Eligibility Casino->>Casino: Restore Player Balance Casino->>Groove: Rollback Response Groove->>Game: Forward Response Game->>Player: Display Updated Balance

Casino Responsibilities

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

  1. Transaction Validation

    • Confirm that the incoming accountid, roundid, and transactionid match the original wager
    • Verify that the wager being rolled back has not already been included in a result
    • Check that no previous rollback has been processed for this transaction
  2. Idempotency Check

    • Check if a request with the same transactionid has been processed before
    • If any essential fields mismatch, return “Transaction operator mismatch”
    • If no mismatches, return the original response with status “200 Success - duplicate request”
  3. Session Expiry Handling

    • A rollback must be accepted even if the game session has expired
    • Return code 1000 Not logged on is never a valid response to a rollback call
  4. Balance Restoration

    • Refund the player’s balance only if a successful wager was found
    • Do not refund in case of a failed wager or any other error
    • Update both real money and bonus balances as appropriate

Request Details

Endpoint

{casino_endpoint}?request=rollback&[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
request String Yes Request method name
Value: rollback
transactionid String(255) Yes Original wager transaction ID to roll back
Example: 7617edd0924c11e7abb2865556898ad0re
rollbackamount Decimal (32,10) No Amount to refund (should match original wager)
Example: 10.00
roundid String(255) No Round identifier (can be empty)
Example: 802d1812c32686748f2afbcacfcc82114cf
Note

**Note on rollbackamount**: The `rollbackamount` parameter is optional. If not provided or set to 0, the casino should use the bet amount from the original wager transaction. When provided, it should match the original wager amount.

Note

**Note on roundid**: While the `roundid` parameter is technically optional, it's recommended to include it when available for better transaction tracing. Some casino implementations may require it for proper wager identification.

Example Request

GET {casino_endpoint}?request=rollback&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&rollbackamount=10.0&roundid=nc8n4nd87&transactionid=trx_id

Response Details

Response Parameters

Parameter Data type Required Description
accounttransactionid String(50) Yes Casino’s internal transaction ID
Example: 7617edd0924c11e7abb2865556898ad0
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
code Integer Yes Response code (see Appendix)
Example: 200
real_balance Decimal (32,10) Yes Player’s real money balance
Example: 100.00
status String Yes Response status (see Appendix)
Example: Success
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

Example Success Response

{
  "code": 200,
  "status": "Success",
  "accounttransactionid": "de73550e-0612-4a1b-8a0d-a5a3745b",
  "balance": 100.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
102 Wager not found Original wager transaction not found or roundId mismatch
110 Operation not allowed Cannot roll back a wager that already has a result transaction
409 Transaction ID exists A rollback for this transaction has already been processed
Warning

Return code `1000 Not logged on` is never a valid response to a rollback call. The casino platform must accept the rollback even if the player's 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. Rollback Eligibility:

    • A wager can only be rolled back if no result has been processed for it
    • Once a result transaction is received, the wager can no longer be rolled back
    • In case a result needs to be rolled back, use Rollback on Result instead
  2. Idempotency Handling:

    • Store transaction IDs to identify duplicate rollback 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)
  3. Balance Restoration:

    • The player’s balance should be restored to its state before the wager
    • If the original wager used both real money and bonus funds, both balances should be restored accordingly
  4. Timing Considerations:

    • Rollbacks may be sent significantly after the original wager
    • The system must handle rollbacks even if the player’s session has expired
    • This is particularly important for games with network issues or delayed error detection
  5. Transaction Record Keeping:

    • Maintain a record of rolled back transactions for auditing and reconciliation
    • Update the status of the original wager to indicate it has been rolled back

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. See Signature Validation for detailed implementation

Signature Example

For the request:

GET {casino_endpoint}?request=rollback&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&rollbackamount=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”
  • rollbackamount: “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: 5ecbc1d5c6bd0ad172c859da01cb90746a61942bdf6f878793a80af7539719e5

Jackpot

Jackpot Transactions

Info

A jackpot transaction occurs when a player wins a special prize pool. This documentation explains how Groove Gaming processes jackpot wins.

Overview

When a player wins a jackpot during gameplay, Groove Gaming sends a Jackpot request to the casino operator. This functions similarly to a Result call but is specifically for jackpot prizes.

Warning

**Important:** Jackpot requests implement idempotency controls. This means the same request should only be processed once. If a duplicate request is received, the system must return the original response with status code 200 and the " Success - duplicate request" status.

Flow Diagram

sequenceDiagram participant Game as Game Provider participant Groove as Groove Platform participant Casino as Casino Operator Game->>Groove: Player wins jackpot Groove->>Casino: Jackpot request Casino->>Casino: Process jackpot win Casino->>Groove: Jackpot response Groove->>Game: Update player balance

Request Details

Endpoint

{casino_endpoint}?request=jackpot&[parameters]

Request Parameters

Parameter Data type Required Description
accountid String(60) - [0-9a-zA-Z] Yes Account ID
Example: 5179068
amount Decimal (32,10) Yes The jackpot win amount
Example: 2000.00
apiversion String Yes API version
Example: 1.2
gameid String Yes Groove game ID
Example: 80102
gamesessionid String(64) Yes Game session ID from start game method
Example: 11_99d71938-c2d9-4844-b950-d598c2es
gamestatus String Yes Game Status
Valid values: completed, pending
request String Yes Request method name
Value: jackpot
roundid String(255) Yes Round ID
Example: 802d1812c32686748f2afbcacfcc82114cf
transactionid String(255) Yes Transaction ID
Example: 7617edd0924c11e7abb2865556898ad0re

Example Request

GET {casino_endpoint}?request=jackpot&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&amount=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)
Example: 500.00
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: 10.00
code Integer Yes Response code (see Appendix)
Example: 200
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
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: 20.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
Note

**Note:** The sum of `bonusWin` and `realMoneyWin` must equal the total jackpot `amount` specified in the request. If your casino does not use bonuses, set `bonusWin` to 0.

Note

**Note:** Jackpot might not be related to round, so it should be accepted even if no wager before.

Example Success Response

{
  "code": 200,
  "status": "Success",
  "walletTx": "de73550e-0612-4a1b-8a0d-a5a3745b",
  "balance": 100.00,
  "bonusWin": 2.00,
  "realMoneyWin": 8.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 jackpot amount is negative
• Player account not found
• Game status is invalid
400 Transaction operator mismatch Transaction belongs to a different operator
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. Always store transaction IDs to ensure idempotency and prevent duplicate processing
  2. Validate all incoming parameters before processing
  3. The jackpot transaction should update player balances immediately
  4. Return appropriate error codes when validation fails

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. See Signature Validation for detailed implementation

Signature Example

For the request:

GET {casino_endpoint}?request=jackpot&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&apiversion=1.2&amount=10.0&roundid=nc8n4nd87&transactionid=trx_id

Query parameters for signature (alphabetically sorted):

  • accountid: “111”
  • amount: “10.0”
  • apiversion: “1.2”
  • device: “desktop”
  • gameid: “80102”
  • gamesessionid: “123_jdhdujdk”
  • roundid: “nc8n4nd87”
  • transactionid: “trx_id”

Concatenated values: 11110.01.2desktop80102123_jdhdujdknc8n4nd87trx_id

With security key "test_key", the signature would be:

X-Groove-Signature: d4cc7c2a2ed2f33657e2c24e0c32c5ead980f793e2ce81eb00316f0544a45048

Rollback On Result

Rollback On Result

Some Game Providers send Rollback for result requests, especially in sport games where the result of a game can be changed even after sending a result request. In this case, Game Providers want to deduct the result amount from a player’s balance.

Responsibilities of the casino platform

Request parameters:

Parameter Data type Mandatory Description
accountid String(60) - [0-9a-zA-Z] required Account ID Example: 5179068
amount Decimal (32, 10) required The jackpot win amount.
Example: 2000
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
gameid String(100) required Groove game ID.
Example: 80102
gamesessionid String(64) required The game session id from the start game method
Example: 11_99d71938-c2d9-4844-b950-d598c2es
request String required Request method name.
Example: reversewin
roundid String(255) required Each casino needs to know to handle the rollback with only the transactionId, although sometimes the roundId will be available as well.
Example: 802d1812c32686748f2afbcacfcc82114cf
transactionid String(255) required Transaction ID
Example: 7617edd0924c11e7abb2865556898ad0re

Request Example:

{casino_endpoint}?request=reversewin&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&amount=10.0&roundid=nc8n4nd87&transactionid=trx_id

Response parameters:

Parameter Data type Mandatory Description
accounttransactionid String(50) required The casino’s internal transaction ID.
Example: 7617edd0924c11e7abb2865556898ad0
apiversion String required The version of the API being used.
Example: 1.2
balance Decimal (32,10) required The total balance amount of the player. This is the sum of the player’s real balance and bonus balance.
Examples:
• 500
• 140.25
bonus_balance Decimal (32,10) optional The player’s bonus balance.
Example: 50.0
code Integer required Response code. See Appendix transactions response status.
Example: 200
game_mode Integer
required for CMA-compliant games,otherwise
optional Combined real and bonus modes.
1 Real mode.
2 Bonus mode.
real_balance Decimal (32,10) required The player’s real balance.
Example: 100.0
status String required The status of the response. See Appendix transactions response status.
Example: Success
Response Example:
Success Response:
{
  "code": 200,
  "status": "Success",
  "accounttransactionid": "aaaaaaa",
  "balance": 100,
  "bonus_balance": 50,
  "real_balance": 50,
  "game_mode": 1,
  "apiversion": "1.2"
}
Error Codes:
Code Status Message
1 Technical error Technical error
110 Operation not allowed
Reasons for this error include:
• A win request was already received for the given wager
Operation not allowed
400 Transaction operator mismatch Transaction operator mismatch

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. See Signature Validation for detailed implementation

Signature Example

For the request:

GET {casino_endpoint}?request=reversewin&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&amount=10.0&roundid=nc8n4nd87&transactionid=trx_id&wintransactionid=win_trx_id&apiversion=1.2

Query parameters for signature (alphabetically sorted):

  • accountid: “111”
  • amount: “10.0”
  • apiversion: “1.2”
  • device: “desktop”
  • gameid: “80102”
  • gamesessionid: “123_jdhdujdk”
  • roundid: “nc8n4nd87”
  • transactionid: “trx_id”
  • wintransactionid: “win_trx_id”

Concatenated values: 11110.01.2desktop80102123_jdhdujdknc8n4nd87trx_idwin_trx_id

With security key "test_key", the signature would be:

X-Groove-Signature: 0e96af62a1fee9e6dfbdbda06bc068a6cf2eb18152e02e39c3af70aecb5d04d7

Rollback On Rollback

Rollback On Rollback

Some Game Providers send Rollback for refund requests, especially in sport games where the result of a game can be changed even after sending a refund request. In this case, Game Providers want to reverse the rollback request.

Responsibilities of the casino platform

Request parameters:

Parameter Data type Mandatory Description
accountid String(60) - [0-9a-zA-Z] required Account ID Example: 5179068
rollbackAmount Decimal (32,10) required The refund amount.
Example: 2000
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
gameid String(100) required Groove game ID.
Example: 80102
gamesessionid String(64) required The game session id from the start game method
Example: 11_99d71938-c2d9-4844-b950-d598c2es
request String required Request method name.
Example: rollbackrollback
roundid String(255) required Each casino needs to know to handle the rollback with only the transactionId, although sometimes the roundId will be available as well.
Example: 802d1812c32686748f2afbcacfcc82114cf
transactionid String(255) required Transaction ID
Example: 7617edd0924c11e7abb2865556898ad0re

Request Example:

{casino_endpoint}?request=rollbackrollback&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&rollbackAmount=10.0&roundid=nc8n4nd87&transactionid=trx_id

Response parameters:

Parameter Data type Mandatory Description
accounttransactionid String(50) required The casino’s internal transaction ID.
Example: 7617edd0924c11e7abb2865556898ad0
apiversion String required The version of the API being used.
Example: 1.2
balance Decimal (32,10) required The total balance amount of the player. This is the sum of the player’s real balance and bonus balance.
Examples:
• 500
• 140.25
bonus_balance Decimal (32,10) optional The player’s bonus balance.
Example: 50.0
code Integer required Response code. See Appendix transactions response status.
Example: 200
game_mode Integer
required for CMA-compliant games,otherwise
optional Combined real and bonus modes.
1 Real mode.
2 Bonus mode.
real_balance Decimal (32,10) required The player’s real balance.
Example: 100.0
status String required The status of the response. See Appendix transactions response status.
Example: Success
Response Example:
Success Response:
{
  "code": 200,
  "status": "Success",
  "accounttransactionid": "aaaaaaa",
  "balance": 100,
  "bonus_balance": 50,
  "real_balance": 50,
  "game_mode": 1,
  "apiversion": "1.2"
}
Error Codes:
Code Status Message
1 Technical error Technical error
110 Operation not allowed
Reasons for this error include:
• A win request was already received for the given wager
Operation not allowed
400 Transaction operator mismatch Transaction operator mismatch

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. See Signature Validation for detailed implementation

Signature Example

For the request:

GET {casino_endpoint}?request=rollbackrollback&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&gameid=80102&rollbackAmount=10.0&roundid=nc8n4nd87&transactionid=trx_id&apiversion=1.2

Query parameters for signature (alphabetically sorted):

  • accountid: “111”
  • apiversion: “1.2”
  • device: “desktop”
  • gameid: “80102”
  • gamesessionid: “123_jdhdujdk”
  • rollbackAmount: “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: ecaeae75702f548f788c92c06804e59d11719a70302704b36ef72d607e180327

Sportsbook - Bet By Batch

Sportsbook Feature - Bet By Batch

Overview

The Bet By Batch transaction is a sportsbook-specific feature that allows processing multiple wagers in a single API call. This is particularly useful for sports betting scenarios where players need to place multiple bets simultaneously (such as parlays, accumulators, or system bets), improving performance and reducing the number of individual API calls required.

Info

Bet By Batch is a sportsbook-optimized endpoint for handling multiple wagers in a single request. Each bet in the batch is processed independently with its own transaction ID and round ID. This feature is essential for complex sports betting scenarios.

Request Format

Endpoint

POST {casino_url}?request=wagerbybatch&request_id=XXXXXXX&gamesessionid=YYYYYY&gameid=TTTTTTT&apiversion=1.2

HTTP Method

POST (Unlike other transaction endpoints that use GET)

Query Parameters

Parameter Type Required Description
request string Yes Must be set to “wagerbybatch”
request_id string Yes Unique identifier for this batch request
gamesessionid string Yes The game session identifier
gameid string Yes The game identifier
apiversion string Yes API version (e.g., “1.2”)

Request Body (JSON)

Field Type Required Description
account_id string Yes Player’s account identifier
game_id string Yes Game identifier (should match query parameter)
game_session_id string Yes Game session identifier (should match query parameter)
device string Yes Device type (e.g., “Desktop”, “Mobile”)
bets array Yes Array of bet objects

Bet Object Structure

Field Type Required Description
frb_id string No Free Round Bonus ID if applicable
amount decimal Yes Wager amount for this bet
round_id string Yes Unique round identifier for this bet
transaction_id string Yes Unique transaction identifier for this bet

Request Example

POST {casino_endpoint}?request=wagerbybatch&request_id=batch_001&gamesessionid=1501_aea2b5b4-e066-4561-a16b-a187a6435a64&gameid=82602&apiversion=1.2

{
    "account_id": "24",
    "game_id": "82602",
    "game_session_id": "1501_aea2b5b4-e066-4561-a16b-a187a6435a64",
    "device": "Desktop",
    "bets": 
    [
            {
            "frb_id": "",
            "amount": 0.01,
            "round_id": "groove_test_00000000000000008",
            "transaction_id": "groove_test_00000000000000008"
            },
            {
            "frb_id": "",
            "amount": 0.02,
            "round_id": "groove_test_00000000000000009",
            "transaction_id": "groove_test_00000000000000009"
            },
            {
            "frb_id": "",
            "amount": 0.03,
            "round_id": "groove_test_00000000000000010",
            "transaction_id": "groove_test_00000000000000010"
            }
    ]
}

Response Format

Success Response

{
  "status": "Success",
  "code": 0,
  "message": "OK",
  "bets": [
    {
      "provider_transaction_id": "groove_test_00000000000000008",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174000",
      "bonus_money_bet": "0.00",
      "real_money_bet": "0.01"
    },
    {
      "provider_transaction_id": "groove_test_00000000000000009",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174001",
      "bonus_money_bet": "0.00",
      "real_money_bet": "0.02"
    },
    {
      "provider_transaction_id": "groove_test_00000000000000010",
      "transaction_id": "123e4567-e89b-12d3-a456-426614174002",
      "bonus_money_bet": "0.00",
      "real_money_bet": "0.03"
    }
  ],
  "balance": "1234.51",
  "real_balance": "1234.51",
  "bonus_balance": "0.00"
}

Response Fields

Field Type Description
status string Response status (“Success”, “Failed”)
code integer Response code (0 for success, error code for failure)
message string Response message
bets array Array of individual bet results
balance decimal Player’s total balance after all batch bets are processed
real_balance decimal Player’s real money balance after batch processing
bonus_balance decimal Player’s bonus money balance after batch processing

Individual Bet Result Fields

Field Type Description
provider_transaction_id string Transaction ID from the game provider (maps to request transaction_id)
transaction_id string Unique transaction identifier in the wallet system
bonus_money_bet decimal Amount of bonus money used for this specific bet
real_money_bet decimal Amount of real money used for this specific bet

Error Handling

Error Response

When the batch request fails:

{
  "code": 1006,
  "status": "Out of money",
  "message": "Insufficient funds to process batch"
}

Common Error Codes

Code Status Description
1 Technical error Internal server error
110 Operation not allowed This error occurs when:
• The wager amount is negative
• Player account not found
• Account ID doesn’t match session ID
200 Success Batch processed successfully
200 Success - duplicate request Duplicate batch request (idempotency)
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 Player session is invalid or expired
1006 Out of money Insufficient funds to place the wagers
1019 Gaming limit Player has exceeded betting limits:
• Loss limit exceeded
• Overall bet limit exceeded
1035 Account blocked Player account is suspended or blocked
Info

**Note**: The Bet By Batch endpoint processes all bets atomically - either all bets succeed or all fail. Individual bet failures within a batch will cause the entire batch to be rejected.

Tip

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

Processing Logic

  1. Batch Validation: The entire batch is validated for structure and session validity
  2. Atomic Processing: All bets in the batch are processed as a single atomic transaction
  3. Balance Check: Total required amount for all bets is validated against available balance
  4. Transaction Recording: Each bet is recorded with its own transaction ID in the wallet system
  5. Balance Updates: Player balance is updated once after all bets are processed
Warning

**Important Considerations:** - Each bet must have a unique transaction_id (provider_transaction_id in response) - All bets must succeed for the batch to be accepted - The entire batch is rolled back if any individual bet fails - Balance is calculated considering both real money and bonus money - The response includes breakdown of real vs bonus money used for each bet

Idempotency

Each individual bet within the batch follows standard idempotency rules:

  • If a transaction_id has been processed before, return the original response for that bet
  • The batch request_id should also be unique for each batch submission
  • Resubmitting the same batch with the same request_id should return the original response

Use Cases

Sports Betting Scenarios

Parlay/Accumulator Bets

Multiple selections combined into a single bet:

{
  "bets": [
    {
      "amount": 10.00,
      "round_id": "parlay_001",
      "transaction_id": "match1_home_win"
    },
    {
      "amount": 10.00,
      "round_id": "parlay_001",
      "transaction_id": "match2_over_2.5"
    },
    {
      "amount": 10.00,
      "round_id": "parlay_001",
      "transaction_id": "match3_both_score"
    }
  ]
}

System Bets

Multiple combinations from selected events:

{
  "bets": [
    {
      "amount": 5.00,
      "round_id": "system_001",
      "transaction_id": "combo_1_2"
    },
    {
      "amount": 5.00,
      "round_id": "system_001",
      "transaction_id": "combo_1_3"
    },
    {
      "amount": 5.00,
      "round_id": "system_001",
      "transaction_id": "combo_2_3"
    }
  ]
}

Multiple Single Bets

Different bets on various sporting events:

{
  "bets": [
    {
      "amount": 20.00,
      "round_id": "single_001",
      "transaction_id": "football_match_1"
    },
    {
      "amount": 15.00,
      "round_id": "single_002",
      "transaction_id": "tennis_match_1"
    },
    {
      "amount": 10.00,
      "round_id": "single_003",
      "transaction_id": "basketball_match_1"
    }
  ]
}

Security

When Signature Validation is enabled:

  1. Include the X-Groove-Signature header
  2. Calculate signature using query parameters (excluding request)
  3. The request body is not included in signature calculation
  4. See Signature Validation for detailed implementation

Signature Example

For the request:

POST {casino_url}?request=wagerbybatch&request_id=batch_001&gamesessionid=1501_xyz&gameid=82602&apiversion=1.2

Query parameters for signature (alphabetically sorted):

  • apiversion: “1.2”
  • gameid: “82602”
  • gamesessionid: “1501_xyz”
  • request_id: “batch_001”

Concatenated values: 1.282602gamesessionid_valuebatch_001

Best Practices

  1. Batch Size: Keep batch sizes reasonable (typically < 100 bets)
  2. Transaction IDs: Use meaningful, unique transaction IDs
  3. Error Recovery: Implement proper error handling for partial failures
  4. Logging: Log both the batch request_id and individual transaction_ids
  5. Validation: Pre-validate bet amounts and balance before submission
  6. Timeout Handling: Set appropriate timeouts for larger batches
Tip

For optimal performance, group related bets that belong to the same game round into a single batch rather than making individual wager calls.