Skip to Content
WalletSeamless WalletOverview

Seamless wallet

The idea of a seamless-wallet approach

  • operators platform and Sportsbook provider use only operators’ wallet
  • operator’s clients place a bet using the money that is present on the operators’ wallet
  • all the betting transactions are performed on the operators’ wallet

Integration schema

Sportsbook FE is the embedded iFrame, or your own frontend built on the Sportsbook API. The three wallet calls on the right are the same either way.

User-flow

The player session must already exist before any wallet call happens. How it is established depends on the product:

  • iFrame — you log the player in on your platform and initialize the iFrame with a validated JWT. See Seamless Login.
  • Your own frontend — you exchange your platform’s token for a Sportsbook session. See Login with token (requires sign-in).

The wallet calls that follow are identical in both cases. The diagram below shows the iFrame case.

Note

User-flow description

  1. player-session - the player is logged in on the operator’s platform and the Sportsbook frontend has an authorized session. In an iFrame integration that means the iFrame was initialized with a validated JWT token — see Seamless Login.

  2. place-bet - the operator’s user tries to place a bet.

    2.1 /place-bet-request - the Sportsbook frontend is sending a request to the Sportsbook BE.

    2.2 processing - Sportsbook BE is validating and processing a bet due to the different risk management settings.

    2.3 /perform-transaction - in case of successful bet processing Sportsbook BE will send a transaction to the operator’s platform BE for user cash debit.

Integration

The client must implement the next endpoints on the side of their platform to guarantee the correct work of a seamless wallet mechanism:

Three rules apply to all of them:

  • Any URL works. You host each endpoint wherever suits your platform — the paths shown on the endpoint pages are only examples.
  • Tell GR8 Tech the URLs. They are configured on the Sportsbook backend, which is the side that calls them.
  • One endpoint per tenant. If you run several Sportsbook brands/tenants, either expose a separate URL per tenant or branch on the X-Brand and X-Operator-Id headers that every request carries.

Request signature

Every request to these endpoints can be signed per RFC 9421 , so your wallet can verify it comes from GR8 Tech. Signing is optional and disabled by default, but highly advised — see Request Signature for how to enable and verify it.

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": "Seamless wallet", "version": "2.0.0", "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`." }, "tags": [ { "name": "Seamless wallet" } ], "paths": { "/api/v2/wallet/{playerId}/balances": { "get": { "operationId": "getUserBalance", "tags": [ "Seamless wallet" ], "summary": "Get user balance", "description": "Called to check whether the player has enough money to place a bet and to calculate the maximum bet amount — and, by default, after each transaction. Expected load: around 20 requests per second.", "parameters": [ { "$ref": "#/components/parameters/PlayerId" }, { "$ref": "#/components/parameters/Currencies" }, { "$ref": "#/components/parameters/XBrand" }, { "$ref": "#/components/parameters/XOperatorId" }, { "$ref": "#/components/parameters/SignatureInput" }, { "$ref": "#/components/parameters/Signature" } ], "responses": { "200": { "description": "The player’s balances. `locked` and `bonus` must ALWAYS be \"0\" unless you integrate the GR8 Tech bonus services.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserBalanceResponse" }, "examples": { "single": { "summary": "Single currency", "value": { "sport": { "main": { "USD": { "cash": "500", "bonus": "0", "locked": "0" } }, "sportsbook": { "USD": { "cash": "500", "bonus": "0", "locked": "0" } } } } }, "multi": { "summary": "Several currencies", "value": { "sport": { "main": { "USD": { "cash": "500", "bonus": "0", "locked": "0" }, "EUR": { "cash": "250", "bonus": "0", "locked": "0" }, "GBP": { "cash": "100", "bonus": "0", "locked": "0" } }, "sportsbook": { "USD": { "cash": "500", "bonus": "0", "locked": "0" }, "EUR": { "cash": "250", "bonus": "0", "locked": "0" }, "GBP": { "cash": "100", "bonus": "0", "locked": "0" } } } } } } } } }, "400": { "description": "Any error. See the `ErrorCode` schema for the codes.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "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": "Set your company name" }, "alreadyProcessed": false } } } } } } } } }, "/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." } } } }, "/api/v2/wallet/{playerId}/transactions/{transactionId}": { "get": { "operationId": "getTransactionById", "tags": [ "Seamless wallet" ], "summary": "Get transaction by id", "description": "Returns a transaction previously received by perform-transaction.", "parameters": [ { "$ref": "#/components/parameters/PlayerId" }, { "$ref": "#/components/parameters/TransactionId" }, { "$ref": "#/components/parameters/XBrand" }, { "$ref": "#/components/parameters/XOperatorId" }, { "$ref": "#/components/parameters/SignatureInput" }, { "$ref": "#/components/parameters/Signature" } ], "responses": { "200": { "description": "The transaction.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionDetails" }, "examples": { "deposit": { "summary": "A deposit transaction", "value": { "currency": "USD", "platform": "sport", "id": "example-transaction-id", "type": "deposit", "initiatedAt": "2021-01-20T00:00:00Z", "createdAt": "2021-01-20T00:00:00Z", "context": { "channel": "DESKTOP_AIR_PM", "product": "sportsbook", "reason": "bet", "betId": "example-bet-id" }, "amountBreakdown": { "bonus": "0", "cash": "40", "locked": "0" }, "balances": { "sport": { "main": { "USD": { "cash": "100", "bonus": "0", "locked": "0" } }, "sportsbook": { "USD": { "cash": "100", "bonus": "0", "locked": "0" } } } }, "status": "success", "alreadyProcessed": false } } } } } }, "204": { "description": "The transaction was not found. No content." }, "400": { "description": "Any other error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" }, "examples": { "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": "Set your company name" }, "alreadyProcessed": false } } } } } } } } } }, "components": { "parameters": { "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" } }, "PlayerId": { "name": "playerId", "in": "path", "required": true, "description": "Id of player.", "schema": { "type": "string" } }, "TransactionId": { "name": "transactionId", "in": "path", "required": true, "description": "Id of transaction — the `id` of a perform-transaction request.", "schema": { "type": "string" } }, "Currencies": { "name": "currencies", "in": "query", "required": false, "description": "Currencies to return. By default, all available currencies are returned.", "schema": { "type": "string" } } }, "schemas": { "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" }, "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." } } }, "CurrencyBalances": { "type": "object", "description": "Balances keyed by ISO 4217 currency code.", "additionalProperties": { "$ref": "#/components/schemas/BalanceDetails" } }, "ProductBalances": { "type": "object", "description": "Balances keyed by product — `main` and `sportsbook`.", "additionalProperties": { "$ref": "#/components/schemas/CurrencyBalances" } }, "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" } }, "UserBalanceResponse": { "type": "object", "required": [ "sport" ], "properties": { "sport": { "type": "object", "required": [ "main", "sportsbook" ], "properties": { "main": { "$ref": "#/components/schemas/CurrencyBalances" }, "sportsbook": { "$ref": "#/components/schemas/CurrencyBalances" } } } } }, "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." }, "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" }, "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 }, "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 }, "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." }, "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" } } } ] }, "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" } } }, "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" } } }, "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" } } } }, "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" } } }, "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." }, "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." }, "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)." } } } ] }, "TransactionDetails": { "description": "A stored transaction, with the balances after it.", "allOf": [ { "$ref": "#/components/schemas/Transaction" }, { "type": "object", "required": [ "balances" ], "properties": { "balances": { "$ref": "#/components/schemas/Balances" }, "status": { "type": "string", "description": "Shown in the example; not required." }, "alreadyProcessed": { "type": "boolean" } } } ] }, "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`." }, "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." } } } } } }