Transaction Examples¶
This page provides complete request and response examples for all transaction types.
Request Examples¶
Withdrawal Example¶
Standard bet placement using cash balance. On placement transactions (reason = bet, bet with tax, or freebet) the context includes the player language so your wallet can return a localized message if it rejects the bet — see Error Response with Localized Message.
{
"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"
}
}
Deposit Example¶
Bet settlement with winnings.
{
"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"
}
}
Rollback Example¶
Cancelling a previously placed bet.
{
"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"
}
}
Award Example¶
Granting a bonus to the player.
{
"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"
}
}
Release Example¶
Converting bonus to cash after wagering requirements are met.
{
"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"
}
}
Retract Example¶
Removing bonus funds when conditions aren't met.
{
"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"
}
}
Response Examples¶
Success Response Example¶
All successful transactions return HTTP 200 with the following structure:
{
"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"
}
}
Idempotency Response Example¶
If the same transaction is sent multiple times (same id), return the same response with alreadyProcessed: true:
{
"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"
}
}
Error Response Example¶
Return HTTP 400 with the following structure for business logic errors:
{
"error": {
"code": "decline.lowbalance",
"message": "Not enough funds for performing transaction",
"origin": "YourCompanyName"
},
"alreadyProcessed": false
}
Error Response with balances¶
For decline.lowbalance (and, optionally, any other error) the wallet may include the player's current balances in the error body. The structure is identical to the success response — platform → product → currency → balance details.
When balances is present on a decline.lowbalance error, the Sportsbook BE skips the follow-up get-user-balance call. See Returning balances in error responses for the full contract.
{
"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
}
Note
On a duplicate transaction ID, return the same error body with alreadyProcessed: true — including the same balances you returned originally.
Error Response with Localized Message¶
Use the decline.client.custom error code together with error.details.localizedMessage when your wallet rejects a placement for an operator-specific reason and wants the player to see a tailored message in the iFrame. See Custom decline with localized message for the full contract.
The localizedMessage value is shown in the iFrame as-is; pick the wording from the language supplied in the original placement request — context.language ("en" in the example above):
{
"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
}
Note
error.message is only used by GR8 Tech for logs and operations — the player never sees it. If you have no translation for the requested language, fall back to a default one
Common Error Codes¶
| Error Code | HTTP Status | Description |
|---|---|---|
| decline.lowbalance | 400 | Insufficient funds. May optionally include current balances in the response (see Error Response with balances). |
| decline.parent.notfound | 400 | Parent transaction not found (for rollbacks) |
| error.user.not-found | 400 | Player not found |
| decline.player.blocked | 400 | Player account is blocked |
| decline.currency.mismatch | 400 | Currency mismatch |
| decline.client.custom | 400 | Operator-specific decline with localized message in error.details.localizedMessage |
For a complete list of error codes, see Wallet Error Codes.
Related Documentation¶
- Perform Transaction - Main transaction endpoint documentation
- Transaction Types Reference - Complete type and reason mapping
- Get Balance - Retrieve player balance
- Wallet Error Codes - Complete error code reference