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.