get-transaction-by-id¶
Request¶
curl -X 'GET' 'https://{api-domain}/v1/wallet-proxy/v1/{playerId}/transactions/{transactionId}'
-H 'Authorization: {auth-token}'
-H 'X-Brand: {brand}'
-H 'X-Operator-Id: {operator}'
Request parameters:
| Param | Param location | Type | Required | Description |
|---|---|---|---|---|
| playerId | Path | string | + | Id of player |
| transactionId | Path | string | + | Id of transaction |
| X-Brand | Header | string | + | key for tenant identification, provided by GR8-Tech |
| X-Operator-Id | Header | string | + | key for tenant identification, provided by GR8-Tech |
| Authorization | Header | string | + | Authorization token "{authResponse.token_type} {authResponse.access_token}" |
Warning
Transactions in our system exist for 3 days. During this period we guarantee idempotency of the transactions. After expiration of its TTL transaction with the same Id will be performed again.
Success response¶
Success response schema
{
"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"
]
}
}
}
Response example
{
"balances": {
"USD": {
"cash": "1000.0",
"bonus": "0",
"locked": "0"
}
},
"status": "success",
"currency": "USD",
"platform": "sport",
"id": "f0fc7fd9d4ea4d1297a9a6a6fd1638ed",
"type": "deposit",
"initiatedAt": "2024-09-18T14:13:04.088Z",
"createdAt": "2024-09-18T14:13:04.088Z",
"context": {
"product": "sportsbook",
"reason": "external transfer",
"correlationId": "2a2364a1db7947fe9c9a0e0fbb2064c4",
"clientName": "{serviceAccountLogin}"
},
"amountBreakdown": {
"cash": "1000.0",
"bonus": "0.0",
"locked": "0.0",
"retract": "0.0"
}
}
Success response description¶
| Parameter | Type | Required? | Description |
|---|---|---|---|
| body | object | + | Response object |
| body.balances | object | + | Object which represents a map of currency and it's balances which were after transaction performing. Always will contain 1 key-value pair with the transaction currency as a key |
| body.balances.USD | object | + | Object which represents a balances which were after transaction performing. |
| body.balances.USD.cash | decimal string | + | Players cash (real money which can be withdrawn) |
| body.balances.USD.bonus | decimal string | + | Players bonus money |
| body.balances.USD.locked | decimal string | + | Players cash which is locked by CRM campaigns and can't be withdrawn at this moment. |
| body.status | string enum | + | Transaction status. Can be success and failed |
| body.currency | string | + | Transaction currency |
| body.platform | string | + | Useless field for iFrame integrators. Always equals sport |
| body.id | string | + | Transaction Id |
| body.type | string | + | Transaction type. Possible values: - deposit- withdrawal- rollback- bonus- award- retract |
| body.initiatedAt | DateTime string | + | UTC timestamp of an action which fired the transaction |
| body.createdAt | DateTime string | + | UTC timestamp of a transaction creation |
| body.context | object | + | Transaction context |
| body.context.product | string | + | Useless field for iFrame integrators. Always equal to sportsbook |
| body.context.reason | string | + | Reason of transaction performing |
| body.context.correlationId | string | + | Transaction Correlation Id |
| body.context.clientName | string | + | Service account login who initiated transaction |
| body.amountBreakdown | object | + | Transaction Amount breakdown |
| body.amountBreakdown.cash | decimal string | + | Players cash which need to be deposited or withdrawn |
| body.amountBreakdown.bonus | decimal string | + | Players bonus which need to be deposited or withdrawn |
| body.amountBreakdown.locked | decimal string | + | Players locked cash which need to be deposited or withdrawn |
| body.amountBreakdown.retract | decimal string | + | Useless field for iFrame integrators |
Error response¶
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"
]
},
"additionalProperties": true,
"required": [
"error"
]
}
}
Error response example
{
"error": {
"code": "error.user.not-found",
"message": "User with specified Id was not found",
"origin": "{source-of-error}"
},
"alreadyProcessed": true
}
Error response description¶
| Parameter | Type | Required? | Description |
|---|---|---|---|
| body | object | + | Error response object |
| body.error | object | + | Error object description |
| body.error.code | string | + | Error code. Possible wallet error codes list |
| body.error.message | string | + | Error message |
| body.error.origin | string | - | Source of error. Is using for debugging and bugs investigation |