get-transaction-by-id
Client needs to notify GR8 Tech about the URL of this endpoint for future configuration as it will be used by the Sportsbook BE. See Integration for the rules shared by all three wallet endpoints.
GET
/api/v2/wallet/{playerId}/transactions/{transactionId}Request parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| playerId | Path | string | required | Id of player. |
| transactionId | Path | string | required | Id of transaction. |
| X-Brand | Header | string | required | 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. |
| X-Operator-Id | Header | string | required | 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. |
| Signature-Input | Header | string | optional | Only sent when request signing is enabled for the brand. Signature parameters and covered components (RFC 9421). |
| Signature | Header | string | optional | Only sent when request signing is enabled for the brand. Request signature to verify (RFC 9421). |
Success response
Success response schema (Status code: 200)
{
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"platform": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"deposit",
"withdrawal",
"rollback"
]
},
"initiatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"context": {
"type": "object",
"properties": {
"product": {
"type": "string"
},
"reason": {
"type": "string"
},
"betId": {
"type": "string"
}
},
"additionalProperties": true
},
"amountBreakdown": {
"type": "object",
"properties": {
"cash": {
"type": "string"
},
"bonus": {
"type": "string"
},
"locked": {
"type": "string"
},
"retract": {
"type": "string"
}
},
"additionalProperties": true
},
"balances": {
"type": "object",
"patternProperties": {
"^.*$": { // platform - "sport"
"^.*$": { // product - "sportsbook"/"main"
"^.*$": { // currency
"type": "object",
"properties": {
"cash": {
"type": "string"
},
"bonus": {
"type": "string"
},
"locked": {
"type": "string"
}
},
"required": [
"cash",
"bonus",
"locked"
],
"additionalProperties": true
}
}
}
},
"additionalProperties": true,
"required": [
"currency",
"platform",
"id",
"amountBreakdown",
"initiatedAt",
"createdAt",
"context",
"balances"
]
}
}
}Response example
{
"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
}Error responses
Warning
If transaction wasn’t found - status code 204, no content. In any other case of error status code has to be 400
Error response schema (Status code: 400)
{
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"origin": {
"type": "string"
}
},
"additionalProperties": true,
"required": [
"code",
"message",
"origin"
]
},
"additionalProperties": true,
"required": [
"error"
]
}
}Error response example
{
"error": {
"code": "error.user.not-found",
"message": "User with specified Id was not found",
"origin": "Set your company name"
},
"alreadyProcessed": false
}Note
The “Wallet error codes” section describes the list of possible errors.
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": "Get transaction by id",
"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/{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": {
"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"
}
},
"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": {
"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"
}
}
}
]
},
"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."
},
"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
},
"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
},
"CurrencyBalances": {
"type": "object",
"description": "Balances keyed by ISO 4217 currency code.",
"additionalProperties": {
"$ref": "#/components/schemas/BalanceDetails"
}
},
"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."
}
}
}
}
}
}