get-transaction-by-id¶
The client can implement this endpoint and use any URL for it.
Client needs to notify GR8 Tech about the URL of this endpoint for future configuration as it will be used by Sportsbook iFrame on the backend side.
Note
The operator must provide different URLs per tenant for these endpoints if he has a few Sportsbook iFrame brands/tenants or build different logic depending on the X-Brand and X-Operator-Id headers.
Danger
ATTENTION!
Get balance request will be always executed after EACH transaction request by default. If you want to disable it, please contact with AM/PM of GR8 TECH team
Request¶
[GET] /api/v2/wallet/{playerId}/transactions/{transactionId}
-H 'X-Brand: BRANDXXX' <--- get this info from our GR8 Tech managers
-H 'X-Operator-Id: OPERATORYYY' <--- get this info from our GR8 Tech managers
Request parameters:
| Param | Param location | Type | Required | Description |
|---|---|---|---|---|
| playerId | Path | string | + | Id of player. |
| transactionId | Path | string | + | Id of transaction. |
| X-Brand | Header | string | + | on of tenant identifiers which represent site and operator. They will be configured during the tenant setup process and can’t be changed. |
| X-Operator-Id | Header | string | + | one of tenant identifiers which represent site and operator. They will be configured during the tenant setup process and can’t be changed. |
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": false
}
}
}
},
"additionalProperties": true,
"required": [
"currency",
"platform",
"id",
"amountBreakdown",
"initiatedAt",
"createdAt",
"context",
"balances"
]
}
}
}
{
"currency": "UAH",
"platform": "sport",
"id": "example-transaction-id",
"type": "deposit",
"initiatedAt": "2021-01-20T00:00:00Z",
"createdAt": "2021-01-20T00:00:00Z",
"context": {
"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
{
"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": {
"code": "error.user.not-found",
"message": "User with specified Id was not found",
"origin": "Set your company name"
},
"alreadyProcessed": false
}
Question
The “Wallet error codes” section describes the list of possible errors.