Transaction Examples¶
This page provides complete request and response examples for all transaction types.
Request Examples¶
Withdrawal Example¶
Standard bet placement using cash balance.
Withdrawal Request (Bet Placement)
{
"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": {
"product": "sportsbook",
"reason": "bet",
"betId": "5f338453-6172-491f-b8f0-27e382ea05eb"
},
"amountBreakdown": {
"cash": "13.9",
"locked": "0",
"bonus": "0"
}
}
Deposit Example¶
Bet settlement with winnings.
Deposit Request (Bet Settlement)
{
"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": {
"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.
Rollback Request (Bet Cancellation)
{
"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.
Award Request (Bonus Grant)
{
"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.
Release Request (Bonus Conversion)
{
"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.
Retract Request (Bonus Removal)
{
"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:
Success Response Example
{
"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": {
"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:
Idempotency Response Example
{
"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": {
"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 Response Example
{
"error": {
"code": "decline.lowbalance",
"message": "Not enough funds for performing transaction",
"origin": "YourCompanyName"
},
"alreadyProcessed": false
}
Common Error Codes¶
| Error Code | HTTP Status | Description |
|---|---|---|
| decline.lowbalance | 400 | Insufficient funds |
| decline.parent.notfound | 400 | Parent transaction not found (for rollbacks) |
| decline.player.notfound | 400 | Player not found |
| decline.player.blocked | 400 | Player account is blocked |
| decline.currency.mismatch | 400 | Currency mismatch |
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