Skip to Content
WalletSeamless WalletPerform TransactionOverview

perform-transaction

The perform-transaction endpoint is the core of wallet integration. It handles all financial operations including deposits, withdrawals, and rollbacks for bets, settlements, and bonus operations.

POST /api/v2/wallet/{playerId}/transactions

Key points:

  • Must guarantee idempotency (same transaction ID = same response)
  • Get balance is called after each transaction by default

See Integration for the rules shared by all three wallet endpoints.


Quick Reference

Transaction Types Overview

TypeDirectionRequiredCommon Use Cases
withdrawalMoney outYesBets, cancel settlements, negative adjustments
depositMoney inYesSettlements, winnings, positive adjustments
rollbackReverseYesBet placement cancellations only
Note

Bonus Integration Transaction types award, release, and retract are only required if you integrate with the GR8 Tech Bonus System.


Endpoint Configuration

Warning

Request Timeout: 2 seconds All transaction requests have a 2-second timeout. Your endpoint must respond within this time limit, otherwise:

Ensure your wallet system can process requests quickly and efficiently.

Request Parameters

ParameterLocationTypeRequiredDescription
playerIdPathstringYesUnique player identifier
X-BrandHeaderstringYesTenant identifier representing site and operator (configured during setup, cannot be changed). Get this value from your GR8 Tech manager.
X-Operator-IdHeaderstringYesTenant identifier representing site and operator (configured during setup, cannot be changed). Get this value from your GR8 Tech manager.
Signature-InputHeaderstringNoOnly sent when request signing is enabled for the brand. Signature parameters and covered components (RFC 9421).
SignatureHeaderstringNoOnly sent when request signing is enabled for the brand. Request signature to verify (RFC 9421).

Request Structure

Core Fields

FieldTypeRequiredDescription
idstringYesUnique transaction identifier. Used for idempotency - same ID = same result
currencystringYesISO 4217 currency code (USD, EUR, KES, etc.)
platformstringYesPlatform identifier (typically “sport” or “CRM”)
typestringYesTransaction type: deposit, withdrawal, rollback, award, release, retract
initiatedAtstringYesISO 8601 timestamp when transaction was initiated
createdAtstringYesISO 8601 timestamp when transaction was created

Context Object

FieldTypeRequiredDescription
productstringYesProduct identifier (sportsbook, crm)
reasonstringYesTransaction reason code (see Reference)
channelstringNoBet related channel for bet transaction (placement + settlement)
betIdstringNoBet identifier (present for bet-related transactions)
parentIdstringNoParent transaction ID. Sent only on rollback transactions, where it always points to the bet placement being reversed.
sessionIdstringNoPlayer session identifier. Present in bet placement transactions when the operator passes a sessionId when starting the session — in an iFrame integration, as a query parameter of the iFrame URL
languagestringNoPlayer language at the moment of bet placement (taken from the X-Language header of the placement request). Sent only on bet placement transactions — reason = bet, bet with tax, or freebet. Use it to localize the error message when rejecting a bet with decline.client.custom.
SportBonusOfferIdstringNoActivity ID from Journey Builder (for bonus transactions)
SportBonusPlayerOfferIdstringNoPlayer-specific bonus activation ID (for bonus transactions)
extrasobjectNoExtended bet details — bet type, total odds, and per-item event, market and outcome data. Disabled by default, enabled per brand on request. See Extended Bet Details

Amount Breakdown

FieldTypeDescription
cashstringCash amount as decimal string (e.g., “100.50”)
bonusstringBonus amount as decimal string
lockedstringLocked amount as decimal string (used for wagering requirements)
retractstringRetract amount as decimal string (bonus funds removed/excess)

Every amount — these four, the same four inside tax, and every value in balances — has at most 18 digits after the decimal point.

Request Schema

Full Request Schema (JSON Schema)

{ "type": "object", "properties": { "currency": { "type": "string", "description": "ISO 4217 currency code (e.g., USD, EUR, KES)" }, "platform": { "type": "string", "description": "Platform identifier (e.g., sport, CRM)" }, "id": { "type": "string", "description": "Unique transaction identifier (used for idempotency)" }, "type": { "type": "string", "enum": ["deposit", "withdrawal", "rollback", "award", "release", "retract"], "description": "Transaction type" }, "initiatedAt": { "type": "string", "format": "date-time", "description": "When transaction was initiated (ISO 8601)" }, "createdAt": { "type": "string", "format": "date-time", "description": "When transaction was created (ISO 8601)" }, "context": { "type": "object", "properties": { "channel": { "type": "string", "description": "Bet related channel for bet transaction (placement + settlement)" }, "product": { "type": "string", "description": "Product identifier (e.g., sportsbook, crm)" }, "reason": { "type": "string", "description": "Transaction reason (see Transaction Types Reference section)", }, "betId": { "type": "string", "description": "Bet identifier (for bet-related transactions: bet, settle, resettle...)" }, "parentId": { "type": "string", "description": "Parent transaction ID (for rollbacks)" }, "SportBonusOfferId": { "type": "string", "description": "Bonus offer ID (Activity ID from Journey Builder)" }, "SportBonusPlayerOfferId": { "type": "string", "description": "Player-specific bonus activation ID" }, "sessionId": { "type": "string", "description": "Player session identifier. Present in bet placement transactions when the operator passes a sessionId when starting the session (in an iFrame integration, as a query parameter of the iFrame URL)" }, "language": { "type": "string", "description": "Player language at the moment of bet placement (taken from the X-Language header of the placement request). Sent only on bet placement transactions (reason = bet, bet with tax, or freebet). Use it to localize the error message when rejecting a bet with decline.client.custom." }, "extras": { "type": "object", "description": "Extended bet details. Disabled by default; enabled per brand on request. See the Extended Bet Details page for the full schema." } }, "required": ["product", "reason"], "additionalProperties": true }, "amountBreakdown": { "type": "object", "properties": { "cash": { "type": "string", "description": "Cash amount (decimal string, up to 18 digits after the decimal point)" }, "bonus": { "type": "string", "description": "Bonus amount (decimal string, up to 18 digits after the decimal point)" }, "locked": { "type": "string", "description": "Locked amount (decimal string, up to 18 digits after the decimal point)" }, "retract": { "type": "string", "description": "Retract amount (decimal string, up to 18 digits after the decimal point)" } }, "additionalProperties": true } }, "required": ["currency", "platform", "id", "type", "amountBreakdown", "initiatedAt", "createdAt", "context"] }

Basic Request Example

Bet Placement Request
{ "id": "5f338453-6172-491f-b8f0-27e382ea05eb", "currency": "USD", "platform": "sport", "type": "withdrawal", "createdAt": "2025-01-29T00:34:25Z", "initiatedAt": "2025-01-29T00:34:25Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet", "betId": "5f338453-6172-491f-b8f0-27e382ea05eb", "sessionId": "some-session-id" }, "amountBreakdown": { "cash": "13.9", "locked": "0", "bonus": "0" } }

For more examples, see Transaction Examples.


Response Structure

Warning

Idempotency Requirements Your wallet MUST implement idempotency to handle duplicate transaction requests:

  • Store transaction snapshots for at least 3 days
  • Return the same response for duplicate transaction IDs (same id field)
  • Set alreadyProcessed: true for duplicate requests
  • Store snapshots even for failed transactions (e.g., decline.lowbalance)

This ensures system reliability during network issues and retries.

Important

Response currency must match the request The currency of every balance returned in balances must be the same as the currency property of the request body. If the request carries "currency": "USD", return USD balances only — do not convert them into the player’s default currency and do not add balances in other currencies.

Success Response

All successful transactions return HTTP 200 with the following structure:

Full Response Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "currency": { "type": "string" }, "platform": { "type": "string" }, "id": { "type": "string" }, "type": { "type": "string", "enum": ["deposit", "withdrawal", "rollback", "award", "release", "retract"] }, "balances": { "type": "object", "description": "Nested structure: platform -> product -> currency -> balance details. The currency key must equal the request's currency", "patternProperties": { "^.*$": { "type": "object", "patternProperties": { "^.*$": { "type": "object", "patternProperties": { "^.*$": { "type": "object", "properties": { "cash": { "type": "string" }, "bonus": { "type": "string" }, "locked": { "type": "string" }, "retract": { "type": "string" } }, "required": ["cash", "bonus", "locked"], "additionalProperties": true } } } } } } }, "alreadyProcessed": { "type": "boolean", "description": "True if transaction was already processed (idempotency)" }, "initiatedAt": { "type": "string" }, "createdAt": { "type": "string" }, "context": { "type": "object", "properties": { "product": { "type": "string" }, "reason": { "type": "string" } }, "additionalProperties": true }, "amountBreakdown": { "type": "object", "properties": { "cash": { "type": "string" }, "bonus": { "type": "string" }, "locked": { "type": "string" }, "retract": { "type": "string" } }, "additionalProperties": true } }, "required": [ "currency", "platform", "id", "type", "balances", "alreadyProcessed", "initiatedAt", "createdAt", "context", "amountBreakdown" ] }

Response Examples

First Request (New Transaction)

Success Response - First Request
{ "balances": { "sport": { "main": { "USD": { "cash": "86.1", "bonus": "0", "locked": "0", "retract": "0" } }, "sportsbook": { "USD": { "cash": "86.1", "bonus": "0", "locked": "0", "retract": "0" } } } }, "alreadyProcessed": false, "currency": "USD", "platform": "sport", "id": "5f338453-6172-491f-b8f0-27e382ea05eb", "type": "withdrawal", "initiatedAt": "2025-01-29T00:34:25.000Z", "createdAt": "2025-01-29T00:34:26.000Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet" }, "amountBreakdown": { "cash": "13.9", "bonus": "0", "locked": "0" } }

Duplicate Request (Idempotency)

If the same transaction ID is sent again, return the exact same response with alreadyProcessed: true:

Success Response - Duplicate Request
{ "balances": { "sport": { "main": { "USD": { "cash": "86.1", "bonus": "0", "locked": "0", "retract": "0" } }, "sportsbook": { "USD": { "cash": "86.1", "bonus": "0", "locked": "0", "retract": "0" } } } }, "alreadyProcessed": true, "currency": "USD", "platform": "sport", "id": "5f338453-6172-491f-b8f0-27e382ea05eb", "type": "withdrawal", "initiatedAt": "2025-01-29T00:34:25.000Z", "createdAt": "2025-01-29T00:34:26.000Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet" }, "amountBreakdown": { "cash": "13.9", "bonus": "0", "locked": "0" } }

For more response examples, see Transaction Examples.


Error Responses

Error Response Structure

Return HTTP 400 with the following structure for business logic errors:

Error Response Schema

{ "type": "object", "properties": { "error": { "type": "object", "properties": { "code": { "type": "string", "description": "Error code from the error codes list" }, "message": { "type": "string", "description": "Human-readable error message (English, for logs/operations)" }, "origin": { "type": "string", "description": "Your company/system name" }, "details": { "type": "object", "description": "Optional structured payload for the error.", "properties": { "localizedMessage": { "type": "string", "description": "Player-language message to be displayed to the player as-is. Used together with the decline.client.custom error code; the language is supplied to your wallet via context.language on the original placement request." } }, "additionalProperties": true } }, "required": ["code", "message", "origin"] }, "alreadyProcessed": { "type": "boolean", "description": "Optional: True if this error was already returned for this transaction ID" }, "balances": { "type": "object", "description": "Optional. Current player balances — same nested structure (platform -> product -> currency -> balance details) as in the success response. When present on a decline.lowbalance error, the Sportsbook BE will use these balances directly instead of making a follow-up get-user-balance call. See Returning balances in error responses.", "patternProperties": { "^.*$": { "type": "object", "patternProperties": { "^.*$": { "type": "object", "patternProperties": { "^.*$": { "type": "object", "properties": { "cash": { "type": "string" }, "bonus": { "type": "string" }, "locked": { "type": "string" }, "retract": { "type": "string" } }, "required": ["cash", "bonus", "locked"], "additionalProperties": true } } } } } } } }, "required": ["error"] }

Error Response Examples

New Error

Error Response - First Occurrence
{ "error": { "code": "decline.lowbalance", "message": "Not enough funds for performing transaction", "origin": "YourCompanyName" }, "alreadyProcessed": false }

Duplicate Error (Idempotency)

If the same transaction ID is sent again and previously failed, return the same error with alreadyProcessed: true:

Error Response - Duplicate Request
{ "error": { "code": "decline.lowbalance", "message": "Not enough funds for performing transaction", "origin": "YourCompanyName" }, "alreadyProcessed": true }

Returning balances in error responses

Your wallet may include the player’s current balances in any error response — the field has the exact same nested structure (platform → product → currency → balance details) as in a successful response.

Primary use case — decline.lowbalance. By default, after a decline.lowbalance the Sportsbook BE calls get-user-balance to show the player the amount available for placing a bet. If your error response already carries balances, the Sportsbook BE uses them directly and skips the follow-up call — fewer round-trips and less load on your wallet.

Behavior notes:

  • The field is optional. If omitted, the existing behaviour (extra get-user-balance call) is preserved.
  • Including balances is also supported on other errors, but decline.lowbalance is the case where it provides a measurable benefit, since it’s the one that triggers an automatic balance refresh.
  • Idempotency rules still apply: when returning the same error for a duplicate transaction ID (alreadyProcessed: true), return the same balances you returned originally.

See Error Response with balances for the full example.

Common Error Codes

Every code your wallet may return, with its HTTP status and when it applies, is listed on Wallet Error Codes.


Custom decline with localized message

Use decline.client.custom when your wallet wants to reject a bet for an operator-specific reason and display a tailored message to the player. The Sportsbook surfaces the message as-is — you do not need to register the reason on our side and we do not translate or rewrite it.

Two parts work together:

  1. Inbound — context.language. On bet placement transactions (reason = bet, bet with tax, or freebet), the request context carries the player’s current language (e.g. en, uk, es). Use it to pick the correct localization for localizedMessage.
  2. Outbound — error.details.localizedMessage. Reject with HTTP 400 and the standard error envelope, but populate details.localizedMessage with the text the player should see. The Sportsbook returns this exact string to the frontend as the error reason; the top-level error.message is used only for logs/operations and is never displayed.

Behavior notes:

  • This applies only to bet placement; settlements, rollbacks and bonus transactions are not user-facing in the same way and do not need a localized message.
  • If context.language is missing or your wallet has no translation for it, fall back to a default language
  • localizedMessage is the only field we read from details for this purpose; you may include other diagnostic fields alongside it, they will be ignored by the Sportsbook.
  • Idempotency rules apply as for any other declined transaction: store the snapshot and return the same response (with alreadyProcessed: true) on a duplicate transaction ID.

See Error Response with Localized Message for the full request/response example.


Rollback and Retry Requirements

Caution

Critical: Must Read Rollback handling has special requirements including:

  • Applies to bet placements only — a settlement is reverted with cancelsettle, not with a rollback
  • Specific error codes (decline.parent.notfound, decline.parent.failed)
  • 400 retries (5 min delay) until a definitive response
  • High availability requirements

Read the complete guide: Rollback and Retry Logic

OpenAPI schema

The OpenAPI 3 document for this endpoint: request, headers, responses and every schema they use.

Show the document

openapi.json
{ "openapi": "3.0.3", "info": { "title": "Perform transaction", "description": "The endpoints the **operator implements** for the GR8 Tech seamless wallet; the Sportsbook backend calls them.\n\n- **Any URL works.** The paths here are only examples — host each endpoint wherever suits your platform and tell GR8 Tech the URLs.\n- **One endpoint per tenant**, or branch on the `X-Brand` and `X-Operator-Id` headers every request carries.\n- **Request signing** (RFC 9421) is optional and disabled by default; when enabled, every request carries `Signature-Input` and `Signature`.", "version": "2.0.0" }, "paths": { "/api/v2/wallet/{playerId}/transactions": { "post": { "operationId": "performTransaction", "tags": [ "Seamless wallet" ], "summary": "Perform transaction", "description": "Handles every money movement: bets, settlements and their corrections, rollbacks of bet placements, and bonus operations.\n\n- **2-second timeout.** A slower response counts as a timeout and is retried.\n- **Idempotent on `id`.** Store a snapshot of every transaction for at least 3 days — failed ones included — and answer a repeated `id` with the same body and `alreadyProcessed: true`.\n- **Balances in the request currency only.** Every balance in `balances` must be in the request’s `currency`.\n- **Rollback reverses a bet placement only** (`context.parentId` points to it); a settlement is reversed with `cancelsettle`. A rollback that cannot be processed must answer `decline.parent.notfound` or `decline.parent.failed`.", "parameters": [ { "$ref": "#/components/parameters/PlayerId" }, { "$ref": "#/components/parameters/XBrand" }, { "$ref": "#/components/parameters/XOperatorId" }, { "$ref": "#/components/parameters/SignatureInput" }, { "$ref": "#/components/parameters/Signature" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionRequest" }, "examples": { "bet": { "summary": "Bet placement (withdrawal, bet)", "value": { "id": "5f338453-6172-491f-b8f0-27e382ea05eb", "currency": "USD", "platform": "sport", "type": "withdrawal", "createdAt": "2025-01-29T00:34:25Z", "initiatedAt": "2025-01-29T00:34:25Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet", "betId": "5f338453-6172-491f-b8f0-27e382ea05eb", "language": "en" }, "amountBreakdown": { "cash": "13.9", "locked": "0", "bonus": "0" } } }, "bet with placement tax": { "summary": "Bet placement with placement tax (amountBreakdown.tax)", "value": { "id": "id", "currency": "USD", "platform": "sport", "type": "withdrawal", "createdAt": "2021-01-20T00:00:00Z", "initiatedAt": "2021-01-20T00:00:00Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet", "betId": "bet-id" }, "amountBreakdown": { "cash": "88.00", "bonus": "0.0", "locked": "0.0", "tax": { "cash": "12.00", "bonus": "0", "locked": "0" } } } }, "settle": { "summary": "Settlement (deposit, settle)", "value": { "id": "5f338453-6172-491f-b8f0-27e382ea05eb_settlement_0", "currency": "USD", "platform": "sport", "type": "deposit", "createdAt": "2025-01-29T01:15:30Z", "initiatedAt": "2025-01-29T01:15:30Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "settle", "betId": "5f338453-6172-491f-b8f0-27e382ea05eb" }, "amountBreakdown": { "cash": "27.8", "locked": "0", "bonus": "0" } } }, "settle with extras": { "summary": "Settlement with extended bet details (context.extras)", "value": { "id": "8b41f0c2-5d7a-4f19-9c3e-2a6d84b1e770_1740486677645468_1", "currency": "EUR", "platform": "sport", "type": "deposit", "createdAt": "2025-02-25T12:31:17Z", "initiatedAt": "2025-02-25T12:31:17Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "settle", "betId": "8b41f0c2-5d7a-4f19-9c3e-2a6d84b1e770", "betAmount": 2, "extras": { "bet": { "betType": "Express", "betOdd": 5.8, "acceptTime": "2025-02-25T12:31:15Z", "result": "Win", "items": [ { "itemIndex": 0, "eventStage": "Prematch", "acceptedOdd": 2.9, "event": { "id": "12770432", "eventName": "Bologna - AC Milan", "sportTypeKey": "F", "sportName": "Football", "categoryId": "417acc9050e04117aff67d43981ed5b2", "categoryName": "Italy", "tournamentId": "6d80f3f3fa35431b80d50f516e4ce075", "tournamentName": "Serie A", "startTime": "2025-02-25T19:45:00Z", "competitorType": "Team", "competitors": [ { "id": "339901", "competitorName": "Bologna" }, { "id": "339919", "competitorName": "AC Milan" } ] }, "sourceOutcomes": [ { "sourceOutcomeIndex": 0, "selectionKey": "[2,[],[0],1,0,[]]", "acceptedOdd": 2.9, "result": "Win", "marketName": "Full-time result", "outcomeName": "Bologna" } ] }, { "itemIndex": 1, "eventStage": "Live", "acceptedOdd": 2, "event": { "id": "12793846", "eventName": "Inter - Juventus", "sportTypeKey": "F", "sportName": "Football", "categoryId": "417acc9050e04117aff67d43981ed5b2", "categoryName": "Italy", "tournamentId": "6d80f3f3fa35431b80d50f516e4ce075", "tournamentName": "Serie A", "startTime": "2025-02-25T17:00:00Z", "competitorType": "Team", "competitors": [ { "id": "348084", "competitorName": "Inter" }, { "id": "351979", "competitorName": "Juventus" } ] }, "sourceOutcomes": [ { "sourceOutcomeIndex": 0, "selectionKey": "[2,[],[0],1,0,[]]", "acceptedOdd": 2, "result": "Win", "marketName": "Full-time result", "outcomeName": "Inter" } ] } ] } } }, "amountBreakdown": { "cash": "11.6", "locked": "0", "bonus": "0", "retract": "0", "tax": { "cash": "0", "locked": "0", "bonus": "0", "retract": "0" } } } }, "settle with settlement tax": { "summary": "Settlement with settlement tax", "value": { "id": "id", "currency": "USD", "platform": "sport", "type": "deposit", "createdAt": "2021-01-20T00:00:00Z", "initiatedAt": "2021-01-20T00:00:00Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "settle", "betId": "bet-id" }, "amountBreakdown": { "cash": "158.4", "bonus": "0.0", "locked": "0.0", "tax": { "cash": "17.6", "bonus": "0.0", "locked": "0.0" } } } }, "sport rollback": { "summary": "Rollback of a bet placement (rollback, sport rollback)", "value": { "id": "5f338453-6172-491f-b8f0-27e382ea05eb_rollback", "currency": "USD", "platform": "sport", "type": "rollback", "createdAt": "2025-01-29T00:35:10Z", "initiatedAt": "2025-01-29T00:35:10Z", "context": { "product": "sportsbook", "reason": "sport rollback", "betId": "5f338453-6172-491f-b8f0-27e382ea05eb", "parentId": "5f338453-6172-491f-b8f0-27e382ea05eb" }, "amountBreakdown": { "cash": "13.9", "locked": "0", "bonus": "0" } } }, "resettle deposit": { "summary": "Resettle with an additional payout (deposit, resettle)", "value": { "currency": "USD", "platform": "sport", "id": "id", "type": "deposit", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "product": "sportsbook", "reason": "resettle", "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "20" } } }, "resettle withdrawal": { "summary": "Resettle taking funds back (withdrawal, resettle)", "value": { "currency": "USD", "platform": "sport", "id": "id", "type": "withdrawal", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "product": "sportsbook", "reason": "resettle", "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "10" } } }, "cancelsettle": { "summary": "Cancel settle (withdrawal, cancelsettle)", "value": { "currency": "USD", "platform": "sport", "id": "id", "type": "withdrawal", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "product": "sportsbook", "reason": "cancelsettle", "betAmount": 10, "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "10" } } }, "partial settle": { "summary": "Partial cashout (deposit, partial settle)", "value": { "currency": "USD", "platform": "sport", "id": "id", "type": "deposit", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "product": "sportsbook", "reason": "partial settle", "betAmount": 10, "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "9" } } }, "partial resettle": { "summary": "Partial resettle (withdrawal, partial resettle)", "value": { "currency": "USD", "platform": "sport", "id": "id", "type": "withdrawal", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "product": "sportsbook", "reason": "partial resettle", "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "1" } } }, "partial cancelsettle": { "summary": "Partial cancel settle (withdrawal, partial cancelsettle)", "value": { "currency": "USD", "platform": "sport", "id": "id", "type": "withdrawal", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "product": "sportsbook", "reason": "partial cancelsettle", "betAmount": 10, "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "9" } } }, "bonus award": { "summary": "Sport bonus award (award, bonus award)", "value": { "id": "e09751f8-bf51-48e4-9883-21eaa720920f-a37f67df-4969-4296-a38f-754384128df5", "currency": "USD", "platform": "sport", "type": "award", "createdAt": "2025-01-29T10:00:00Z", "initiatedAt": "2025-01-29T10:00:00Z", "context": { "product": "sportsbook", "reason": "bonus award", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "bonus": "100.0", "locked": "10.0" } } }, "bonus limit release": { "summary": "Sport bonus release (release, bonus limit release)", "value": { "id": "e09751f8-bf51-48e4-9883-21eaa720920f-a37f67df-4969-4296-a38f-754384128df5-Release", "currency": "USD", "platform": "sport", "type": "release", "createdAt": "2025-01-29T12:00:00Z", "initiatedAt": "2025-01-29T12:00:00Z", "context": { "product": "sportsbook", "reason": "bonus limit release", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "bonus": "85.0", "locked": "10.0", "retract": "15.0" } } }, "bonus release": { "summary": "Sport bonus retract (retract, bonus release)", "value": { "id": "e09751f8-bf51-48e4-9883-21eaa720920f-a37f67df-4969-4296-a38f-754384128df5-Retract", "currency": "USD", "platform": "sport", "type": "retract", "createdAt": "2025-01-29T12:00:00Z", "initiatedAt": "2025-01-29T12:00:00Z", "context": { "product": "sportsbook", "reason": "bonus release", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "bonus": "100.0", "locked": "10.0" } } }, "freebet award": { "summary": "Freebet award (award, freebet award)", "value": { "currency": "USD", "platform": "sport", "id": "e09751f8-bf51-48e4-9883-21eaa720920f-a37f67df-4969-4296-a38f-754384128df5", "type": "award", "initiatedAt": "2024-06-28T13:09:33.000Z", "createdAt": "2024-06-28T13:09:33.000Z", "context": { "product": "sportsbook", "reason": "freebet award", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "cash": "0.0", "bonus": "1000.0", "locked": "0.0" } } }, "freebet": { "summary": "Freebet bet placement (withdrawal, freebet)", "value": { "currency": "USD", "platform": "sport", "id": "0a497028-004d-4b46-b8ba-655757a72474", "type": "withdrawal", "initiatedAt": "2024-06-28T13:10:31.000Z", "createdAt": "2024-06-28T13:10:31.000Z", "context": { "product": "sportsbook", "reason": "freebet", "betId": "0a497028-004d-4b46-b8ba-655757a72474", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "cash": "0.0", "bonus": "1000.0", "locked": "0.0" } } }, "rollback freebet": { "summary": "Freebet placement rollback (rollback, rollback freebet)", "value": { "currency": "USD", "platform": "sport", "id": "0a497028-004d-4b46-b8ba-655757a72474-rollback", "type": "rollback", "initiatedAt": "2024-06-28T13:10:31.000Z", "createdAt": "2024-06-28T13:10:31.000Z", "context": { "product": "sportsbook", "reason": "rollback freebet", "betId": "0a497028-004d-4b46-b8ba-655757a72474", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f", "parentId": "0a497028-004d-4b46-b8ba-655757a72474" }, "amountBreakdown": { "cash": "0.0", "bonus": "1000.0", "locked": "0.0" } } }, "settle freebet": { "summary": "Freebet settlement (deposit, settle freebet)", "value": { "currency": "USD", "platform": "sport", "id": "0a497028-004d-4b46-b8ba-655757a72474_1719581699813782_0", "type": "deposit", "initiatedAt": "2024-06-28T13:35:00.000Z", "createdAt": "2024-06-28T13:35:00.000Z", "context": { "product": "sportsbook", "reason": "settle freebet", "betId": "0a497028-004d-4b46-b8ba-655757a72474", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "cash": "3000.0", "bonus": "0.0", "locked": "0.0", "retract": "1000.0" } } }, "cancelsettle freebet": { "summary": "Freebet cancel settle (withdrawal, cancelsettle freebet)", "value": { "currency": "USD", "platform": "sport", "id": "0a497028-004d-4b46-b8ba-655757a72474_1719581706873613_0", "type": "withdrawal", "initiatedAt": "2024-06-28T13:35:07.000Z", "createdAt": "2024-06-28T13:35:07.000Z", "context": { "product": "sportsbook", "reason": "cancelsettle freebet", "betId": "0a497028-004d-4b46-b8ba-655757a72474", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "cash": "3000.0", "bonus": "0.0", "locked": "0.0", "retract": "1000.0" } } }, "resettle freebet deposit": { "summary": "Freebet resettle, payout up (deposit, resettle freebet)", "value": { "currency": "USD", "platform": "sport", "id": "0a497028-004d-4b46-b8ba-655757a72474_1719822877083933_0", "type": "deposit", "initiatedAt": "2024-07-01T08:34:37.000Z", "createdAt": "2024-07-01T08:34:37.000Z", "context": { "product": "sportsbook", "reason": "resettle freebet", "betId": "0a497028-004d-4b46-b8ba-655757a72474", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "cash": "3000.0", "bonus": "0.0", "locked": "0.0", "retract": "0.0" } } }, "resettle freebet withdrawal": { "summary": "Freebet resettle, payout down (withdrawal, resettle freebet)", "value": { "currency": "USD", "platform": "sport", "id": "0a497028-004d-4b46-b8ba-655757a72474_1719581726333059_0", "type": "withdrawal", "initiatedAt": "2024-06-28T13:35:26.000Z", "createdAt": "2024-06-28T13:35:26.000Z", "context": { "product": "sportsbook", "reason": "resettle freebet", "betId": "0a497028-004d-4b46-b8ba-655757a72474", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "cash": "3000.0", "bonus": "0.0", "locked": "0.0", "retract": "0.0" } } }, "freebet release": { "summary": "Freebet retract (retract, freebet release)", "value": { "currency": "USD", "platform": "sport", "id": "d8f21aca-7938-44cc-becd-7b0afa7ee491-a37f67df-4969-4296-a38f-754384128df5-Retract", "type": "retract", "initiatedAt": "2024-07-02T09:03:51.000Z", "createdAt": "2024-07-02T09:03:51.000Z", "context": { "product": "sportsbook", "reason": "freebet release", "SportBonusOfferId": "a37f67df-4969-4296-a38f-754384128df5", "SportBonusPlayerOfferId": "e09751f8-bf51-48e4-9883-21eaa720920f" }, "amountBreakdown": { "cash": "0.0", "bonus": "1000.0" } } } } } } }, "responses": { "200": { "description": "Transaction processed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionResponse" }, "examples": { "first request": { "summary": "New transaction", "value": { "balances": { "sport": { "main": { "USD": { "cash": "86.1", "bonus": "0", "locked": "0", "retract": "0" } }, "sportsbook": { "USD": { "cash": "86.1", "bonus": "0", "locked": "0", "retract": "0" } } } }, "alreadyProcessed": false, "currency": "USD", "platform": "sport", "id": "5f338453-6172-491f-b8f0-27e382ea05eb", "type": "withdrawal", "initiatedAt": "2025-01-29T00:34:25.000Z", "createdAt": "2025-01-29T00:34:26.000Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet" }, "amountBreakdown": { "cash": "13.9", "bonus": "0", "locked": "0" } } }, "duplicate request": { "summary": "Duplicate transaction id (alreadyProcessed: true)", "value": { "balances": { "sport": { "main": { "USD": { "cash": "86.1", "bonus": "0", "locked": "0", "retract": "0" } }, "sportsbook": { "USD": { "cash": "86.1", "bonus": "0", "locked": "0", "retract": "0" } } } }, "alreadyProcessed": true, "currency": "USD", "platform": "sport", "id": "5f338453-6172-491f-b8f0-27e382ea05eb", "type": "withdrawal", "initiatedAt": "2025-01-29T00:34:25.000Z", "createdAt": "2025-01-29T00:34:26.000Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet" }, "amountBreakdown": { "cash": "13.9", "bonus": "0", "locked": "0" } } }, "rollback": { "summary": "Rollback of a bet placement", "value": { "id": "5f338453-6172-491f-b8f0-27e382ea05eb_rollback", "currency": "USD", "platform": "sport", "type": "rollback", "createdAt": "2025-01-29T00:35:10Z", "initiatedAt": "2025-01-29T00:35:10Z", "context": { "product": "sportsbook", "reason": "sport rollback", "betId": "5f338453-6172-491f-b8f0-27e382ea05eb", "parentId": "5f338453-6172-491f-b8f0-27e382ea05eb" }, "amountBreakdown": { "cash": "13.9", "locked": "0", "bonus": "0" }, "balances": { "sport": { "main": { "USD": { "cash": "100.0", "bonus": "0", "locked": "0", "retract": "0" } }, "sportsbook": { "USD": { "cash": "100.0", "bonus": "0", "locked": "0", "retract": "0" } } } }, "alreadyProcessed": false } }, "negative balance": { "summary": "Settlement correction leaving a negative cash balance", "value": { "balances": { "sport": { "main": { "USD": { "cash": "-15", "bonus": "0", "locked": "0" } }, "sportsbook": { "USD": { "cash": "-15", "bonus": "0", "locked": "0" } } } }, "alreadyProcessed": false, "currency": "USD", "platform": "sport", "id": "8c1f0a6e-2d44-4b9a-9f77-0b3e51ad92c4", "type": "withdrawal", "initiatedAt": "2026-03-11T14:02:07Z", "createdAt": "2026-03-11T14:02:07Z", "context": { "product": "sportsbook", "reason": "cancelsettle", "betAmount": 10, "betId": "4494226fa9c24b978b975823e353616b" }, "amountBreakdown": { "cash": "25" } } } } } } }, "400": { "description": "Business error — a definitive answer, never retried. Use one of the `ErrorCode` values; one example per code below.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "error.general": { "summary": "error.general", "value": { "error": { "code": "error.general", "message": "Internal error while processing the transaction", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "error.request.invalid": { "summary": "error.request.invalid", "value": { "error": { "code": "error.request.invalid", "message": "Field amountBreakdown.cash is not a valid decimal", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "error.user.not-found": { "summary": "error.user.not-found", "value": { "error": { "code": "error.user.not-found", "message": "User with specified Id was not found", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "error.retry.incorrect": { "summary": "error.retry.incorrect", "value": { "error": { "code": "error.retry.incorrect", "message": "Transaction 5f338453-6172-491f-b8f0-27e382ea05eb was already received with a different body", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "limit.exceeded": { "summary": "limit.exceeded", "value": { "error": { "code": "limit.exceeded", "message": "Internal wallet limit exceeded", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.limit.conflict": { "summary": "decline.limit.conflict", "value": { "error": { "code": "decline.limit.conflict", "message": "Regulatory limit exceeded", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.parent.notfound": { "summary": "decline.parent.notfound (rollback)", "value": { "error": { "code": "decline.parent.notfound", "message": "Parent transaction 5f338453-6172-491f-b8f0-27e382ea05eb not found", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.parent.failed": { "summary": "decline.parent.failed (rollback)", "value": { "error": { "code": "decline.parent.failed", "message": "Parent transaction 5f338453-6172-491f-b8f0-27e382ea05eb failed with insufficient funds", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.balance.conflict": { "summary": "decline.balance.conflict", "value": { "error": { "code": "decline.balance.conflict", "message": "Balance conflict while processing the transaction", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.currency.mismatch": { "summary": "decline.currency.mismatch", "value": { "error": { "code": "decline.currency.mismatch", "message": "Transaction currency USD does not match account currency EUR", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.player.blocked": { "summary": "decline.player.blocked", "value": { "error": { "code": "decline.player.blocked", "message": "Player is blocked", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.lowbalance": { "summary": "decline.lowbalance", "value": { "error": { "code": "decline.lowbalance", "message": "Not enough funds for performing transaction", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.restrictions": { "summary": "decline.restrictions", "value": { "error": { "code": "decline.restrictions", "message": "Transaction rejected by a regulator restriction", "origin": "YourCompanyName" }, "alreadyProcessed": false } }, "decline.client.custom": { "summary": "decline.client.custom", "value": { "error": { "code": "decline.client.custom", "message": "Bet rejected due to risky player behaviour", "origin": "YourCompanyName", "details": { "localizedMessage": "Bet rejected due to risky player behaviour" } }, "alreadyProcessed": false } }, "decline.lowbalance with balances": { "summary": "decline.lowbalance with balances (skips the follow-up get-user-balance call)", "value": { "error": { "code": "decline.lowbalance", "message": "Not enough funds for performing transaction", "origin": "YourCompanyName" }, "balances": { "sport": { "main": { "USD": { "cash": "5.10", "bonus": "0", "locked": "0", "retract": "0" } }, "sportsbook": { "USD": { "cash": "5.10", "bonus": "0", "locked": "0", "retract": "0" } } } }, "alreadyProcessed": false } }, "duplicate request": { "summary": "Same error repeated for a duplicate transaction id", "value": { "error": { "code": "decline.lowbalance", "message": "Not enough funds for performing transaction", "origin": "YourCompanyName" }, "alreadyProcessed": true } } } } } }, "429": { "description": "Temporary unavailability. Triggers retries: 3 for a bet placement (then a rollback), 400 every 5 minutes for a rollback, 1000 every minute for a settlement, 100 every 5 minutes for a bonus operation." }, "5XX": { "description": "Temporary unavailability, retried like 429. Use it only when you cannot answer definitively — e.g. a rollback arriving while its parent placement is still being processed — never for a business error." } } } } }, "components": { "parameters": { "PlayerId": { "name": "playerId", "in": "path", "required": true, "description": "Id of player.", "schema": { "type": "string" } }, "XBrand": { "name": "X-Brand", "in": "header", "required": true, "description": "One of tenant identifiers which represent site and operator. They will be configured during the tenant setup process and can’t be changed. Get this value from your GR8 Tech manager.", "schema": { "type": "string" } }, "XOperatorId": { "name": "X-Operator-Id", "in": "header", "required": true, "description": "One of tenant identifiers which represent site and operator. They will be configured during the tenant setup process and can’t be changed. Get this value from your GR8 Tech manager.", "schema": { "type": "string" } }, "SignatureInput": { "name": "Signature-Input", "in": "header", "required": false, "description": "Only sent when request signing is enabled for the brand. Signature parameters and covered components (RFC 9421).", "schema": { "type": "string" }, "example": "sig=(\"@method\" \"@target-uri\" \"content-digest\");created=1738110865;keyid=\"key-1\";nonce=\"nonce\";alg=\"ed25519\"" }, "Signature": { "name": "Signature", "in": "header", "required": false, "description": "Only sent when request signing is enabled for the brand. Request signature to verify (RFC 9421).", "schema": { "type": "string" } } }, "schemas": { "TransactionRequest": { "description": "A perform-transaction request.", "allOf": [ { "$ref": "#/components/schemas/Transaction" }, { "type": "object", "properties": { "context": { "$ref": "#/components/schemas/TransactionRequestContext" } } } ] }, "TransactionResponse": { "description": "The transaction echoed back — without the extended bet details, which the wallet need not return — plus the balances after it.", "allOf": [ { "$ref": "#/components/schemas/Transaction" }, { "type": "object", "required": [ "balances", "alreadyProcessed" ], "properties": { "balances": { "$ref": "#/components/schemas/Balances" }, "alreadyProcessed": { "type": "boolean", "description": "true when this transaction id was processed before (idempotency)." } } } ] }, "ErrorResponse": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "object", "required": [ "code", "message", "origin" ], "additionalProperties": true, "properties": { "code": { "$ref": "#/components/schemas/ErrorCode" }, "message": { "type": "string", "description": "Human-readable message for logs and operations — never shown to the player." }, "origin": { "type": "string", "description": "Your company or system name." }, "details": { "type": "object", "additionalProperties": true, "description": "Optional structured payload.", "properties": { "localizedMessage": { "type": "string", "description": "With `decline.client.custom`: the text shown to the player as-is, in `context.language`." } } } } }, "alreadyProcessed": { "type": "boolean", "description": "true when this error was already returned for this transaction id." }, "balances": { "allOf": [ { "$ref": "#/components/schemas/Balances" } ], "description": "Optional current balances. On `decline.lowbalance` the Sportsbook uses them and skips the follow-up get-user-balance call." } } }, "Transaction": { "type": "object", "required": [ "currency", "platform", "id", "type", "amountBreakdown", "initiatedAt", "createdAt", "context" ], "properties": { "id": { "type": "string", "description": "Unique transaction id. Idempotency key: the same id must get the same response." }, "currency": { "type": "string", "description": "ISO 4217 currency code.", "example": "USD" }, "platform": { "type": "string", "description": "Platform identifier — `sport` or `CRM`.", "example": "sport" }, "type": { "$ref": "#/components/schemas/TransactionType" }, "initiatedAt": { "type": "string", "format": "date-time", "description": "When the transaction was initiated (ISO 8601)." }, "createdAt": { "type": "string", "format": "date-time", "description": "When the transaction was created (ISO 8601)." }, "context": { "$ref": "#/components/schemas/TransactionContext" }, "amountBreakdown": { "$ref": "#/components/schemas/AmountBreakdown" } }, "description": "A transaction as the wallet stores it — without the extended bet details." }, "TransactionRequestContext": { "description": "The context of a perform-transaction request: TransactionContext plus the optional extended bet details.", "allOf": [ { "$ref": "#/components/schemas/TransactionContext" }, { "type": "object", "properties": { "extras": { "$ref": "#/components/schemas/TransactionExtras" } } } ] }, "Balances": { "type": "object", "description": "Balances keyed by platform (`sport`), then product, then currency. The currency must equal the request’s `currency`.", "additionalProperties": { "$ref": "#/components/schemas/ProductBalances" } }, "ErrorCode": { "type": "string", "enum": [ "error.general", "error.request.invalid", "error.user.not-found", "error.retry.incorrect", "limit.exceeded", "decline.limit.conflict", "decline.parent.notfound", "decline.parent.failed", "decline.balance.conflict", "decline.currency.mismatch", "decline.player.blocked", "decline.lowbalance", "decline.restrictions", "decline.client.custom" ], "description": "- `error.general` — Unknown issue / internal server error.\n- `error.request.invalid` — The request parameters are invalid.\n- `error.user.not-found` — The player was not found.\n- `error.retry.incorrect` — A retried transaction differs from the original one with the same `id`.\n- `limit.exceeded` — Internal limits exceeded.\n- `decline.limit.conflict` — Regulator or tax limits exceeded.\n- `decline.parent.notfound` — Rollback only: the parent transaction (`context.parentId`) was not found.\n- `decline.parent.failed` — Rollback only: the parent transaction was found but had failed.\n- `decline.balance.conflict` — Unexpected error with balances.\n- `decline.currency.mismatch` — The transaction currency does not match the player's account currency.\n- `decline.player.blocked` — The player is blocked. Expected to be temporary for settle / resettle / cancelsettle.\n- `decline.lowbalance` — Insufficient funds. May carry `balances`, which saves the follow-up get-user-balance call.\n- `decline.restrictions` — Regulator restriction.\n- `decline.client.custom` — Operator-specific decline of a bet placement; put the player-facing text in `error.details.localizedMessage`." }, "TransactionType": { "type": "string", "enum": [ "deposit", "withdrawal", "rollback", "award", "release", "retract" ], "description": "`deposit` money in · `withdrawal` money out · `rollback` reverses a bet placement · `award`, `release`, `retract` are for the GR8 Tech bonus integration only." }, "TransactionContext": { "type": "object", "required": [ "product", "reason" ], "additionalProperties": true, "properties": { "product": { "type": "string", "description": "Product identifier — `sportsbook` or `crm`.", "example": "sportsbook" }, "reason": { "$ref": "#/components/schemas/TransactionReason" }, "channel": { "type": "string", "description": "Channel of the bet, on bet transactions (placement and settlement).", "example": "DESKTOP_AIR_PM" }, "betId": { "type": "string", "description": "Bet identifier, on bet-related transactions." }, "betAmount": { "type": "number", "description": "The bet’s stake, on settlement transactions. A partial settle can pay more or less than it." }, "parentId": { "type": "string", "description": "Sent only on `rollback`: the id of the bet placement being reversed." }, "sessionId": { "type": "string", "description": "Player session id, on bet placement — when the operator passes a `sessionId` when starting the session." }, "language": { "type": "string", "description": "Player language at bet placement (from the `X-Language` header). Sent only on bet placement; use it to localize `decline.client.custom`.", "example": "en" }, "SportBonusOfferId": { "type": "string", "description": "Activity id from Journey Builder, on bonus transactions." }, "SportBonusPlayerOfferId": { "type": "string", "description": "Player-specific bonus activation id, on bonus transactions." } }, "description": "Transaction context. On perform-transaction requests it can also carry `extras` — see TransactionRequestContext." }, "AmountBreakdown": { "type": "object", "properties": { "cash": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Cash amount." }, "bonus": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Bonus amount." }, "locked": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Locked amount (wagering requirements)." }, "retract": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Retract amount (bonus funds removed / excess)." }, "tax": { "$ref": "#/components/schemas/TaxBreakdown" } }, "additionalProperties": true }, "TransactionExtras": { "type": "object", "description": "Extended bet details. Disabled by default; enabled per brand on request. Sent on bet-related transactions.", "properties": { "bet": { "$ref": "#/components/schemas/ExtrasBet" } } }, "ProductBalances": { "type": "object", "description": "Balances keyed by product — `main` and `sportsbook`.", "additionalProperties": { "$ref": "#/components/schemas/CurrencyBalances" } }, "TransactionReason": { "type": "string", "description": "Why the transaction happens. Core: `bet`, `settle`, `resettle`, `cancelsettle`, `sport rollback`. Partial cashout: `partial settle`, `partial resettle`, `partial cancelsettle`. Bonus: `bonus award`, `bonus release`, `bonus limit release`. Freebet: `freebet award`, `freebet`, `freebet release`, `rollback freebet`, `settle freebet`, `cancelsettle freebet`, `resettle freebet`.", "example": "bet" }, "Amount": { "type": "string", "description": "A decimal amount as a string, e.g. \"100.50\" — at most 18 digits after the decimal point. Balances can be negative.", "pattern": "^-?[0-9]+(\\.[0-9]{1,18})?$", "example": "100.50" }, "TaxBreakdown": { "type": "object", "description": "Tax part of the amount — sent only when placement or settlement taxation is enabled for the brand.", "properties": { "cash": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Cash amount." }, "bonus": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Bonus amount." }, "locked": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Locked amount (wagering requirements)." }, "retract": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Retract amount (bonus funds removed / excess)." } }, "additionalProperties": true }, "ExtrasBet": { "type": "object", "required": [ "betType", "betOdd", "items", "result" ], "properties": { "betType": { "type": "string", "enum": [ "Ordinar", "Express", "System" ] }, "betOdd": { "type": "number", "description": "Total odds of the bet; for an express, the product of all item odds." }, "acceptTime": { "type": "string", "format": "date-time", "description": "Bet acceptance time, UTC. Sent only on settle-related transactions." }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ExtrasBetItem" } }, "result": { "$ref": "#/components/schemas/BetResult" } } }, "CurrencyBalances": { "type": "object", "description": "Balances keyed by ISO 4217 currency code.", "additionalProperties": { "$ref": "#/components/schemas/BalanceDetails" } }, "ExtrasBetItem": { "type": "object", "description": "One event in the bet. More than one sourceOutcome means a bet builder.", "required": [ "itemIndex", "eventStage", "acceptedOdd", "event", "sourceOutcomes" ], "properties": { "itemIndex": { "type": "integer" }, "eventStage": { "type": "string", "enum": [ "Prematch", "Live" ] }, "acceptedOdd": { "type": "number" }, "event": { "$ref": "#/components/schemas/ExtrasEvent" }, "sourceOutcomes": { "type": "array", "items": { "$ref": "#/components/schemas/ExtrasSourceOutcome" } } } }, "BetResult": { "type": "string", "enum": [ "Unknown", "Win", "Lose", "Return", "Return025", "Return075", "TechnicalReturn", "Cashout", "DeadHeat" ], "description": "Unknown until settled. Return025 / Return075: Asian markets, half loss / half win. Cashout applies to the bet as a whole. DeadHeat: single bets only." }, "BalanceDetails": { "type": "object", "required": [ "cash", "bonus", "locked" ], "additionalProperties": true, "properties": { "cash": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "The player's real money." }, "bonus": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Bonus funds. Always \"0\" unless you integrate the GR8 Tech bonus services." }, "locked": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Locked funds (wagering). Always \"0\" unless you integrate the GR8 Tech bonus services." }, "retract": { "allOf": [ { "$ref": "#/components/schemas/Amount" } ], "description": "Retracted bonus funds." } } }, "ExtrasEvent": { "type": "object", "required": [ "id", "eventName", "sportTypeKey", "sportName", "categoryId", "categoryName", "tournamentId", "tournamentName", "startTime", "competitorType", "competitors" ], "properties": { "id": { "type": "string" }, "eventName": { "type": "string" }, "sportTypeKey": { "type": "string", "description": "Short sport code — F, TT, H…" }, "sportName": { "type": "string" }, "categoryId": { "type": "string" }, "categoryName": { "type": "string" }, "tournamentId": { "type": "string" }, "tournamentName": { "type": "string" }, "startTime": { "type": "string", "format": "date-time" }, "competitorType": { "type": "string" }, "competitors": { "type": "array", "items": { "type": "object", "required": [ "id", "competitorName" ], "properties": { "id": { "type": "string" }, "competitorName": { "type": "string" } } } } } }, "ExtrasSourceOutcome": { "type": "object", "required": [ "sourceOutcomeIndex", "selectionKey", "acceptedOdd", "result", "marketName", "outcomeName" ], "properties": { "sourceOutcomeIndex": { "type": "integer" }, "selectionKey": { "type": "string", "description": "Opaque outcome identifier — do not parse it." }, "acceptedOdd": { "type": "number" }, "result": { "$ref": "#/components/schemas/BetResult" }, "marketName": { "type": "string" }, "outcomeName": { "type": "string" } } } } } }

Implementation Checklist

Core Integration (Required)

  • Implement endpoint with your URL structure
  • Handle core transaction types: deposit, withdrawal, rollback
  • Implement idempotency check (same id = same response)
  • Store transaction snapshots for at least 3 days (including failed transactions)
  • Return correct balance structure in response, with balances in the request’s currency only
  • Handle core reason codes: bet, settle, resettle, cancelsettle, sport rollback
  • Route sport rollback and cancelsettle through separate handlers — a rollback reverses a placement and validates parentId, a cancel settle reverses a settlement and has no parent
  • Implement proper error responses with correct error codes
  • ⚠️ CRITICAL: Read and implement Rollback and Retry Logic
  • Test retry scenarios for each operation type
  • Configure X-Brand and X-Operator-Id header handling
  • Notify GR8 Tech of your endpoint URL
  • Test with GR8 Tech team before going live

Bonus Integration (Optional)

Only required if integrating with GR8 Tech Bonus System:

  • Handle bonus transaction types: award, release, retract
  • Implement bonus balance tracking (bonus, locked, retract)
  • Handle bonus reason codes: bonus award, bonus release, bonus limit release
  • Handle freebet reason codes: freebet award, freebet, settle freebet, etc.
  • Test bonus award and release flows
  • Test freebet flows (if applicable)
  • Review Sport Bonus Amount documentation
  • Review Freebet documentation (if applicable)

Core Wallet Integration

Bonus System Integration (Optional)