Settlement
This method is used to send the result of a bet in order to adjust the player’s balance. There can be one or multiple settlement requests for the same bet.
Important notes
- Settlement of a bet may occur much later (e.g., months after) the bet was placed. This also means that the settlement is not confined to the active game session.
- The Operator’s PAM system needs to be prepared to handle a large volume of settlements when a popular sporting event concludes and results are finalized on the Sportsbook platform.
Request
- Path: /settlement
- Retried: yes
| Field | Type | Description |
|---|---|---|
transactionId | string (required) | Unique transaction identifier. The basis of idempotency. |
betId | string (required) | Unique identifier of bet. Can be used to correlate bet with corresponding settlement(s) and unsettlement(s) |
playerId | string (required) | Unique player identifier in Operator’s PAM |
amount | decimal (required) | Amount to be added to player’s balance. Can be 0. |
currency | string (required) | Currency code of the bet amount |
type | enum (required) | Values: BET_PAID, CASHOUT, VOIDED |
Example Settlement request - BET_PAID
POST https://{wallet base url}/settlement HTTP/1.1
Content-Type: application/json
{
"transactionId": "7229be34-8e56-4fe5-a837-71bcd041c46c",
"betId": "3937da17-b20b-4c3b-90ea-817dd74987e5",
"playerId": "2b84aabc-e2cb-4fbc-a038-e2123e0a0311",
"amount": 200.00,
"currency": "USD",
"type": "BET_PAID"
} Response
| Field | Type | Description |
|---|---|---|
balance | decimal (required) | Player’s current balance in player’s currency |
currency | string (required) | Currency code for player’s balance |
walletTransactionId | string | Wallet (PAM) transaction reference |
Example Settlement response
{
"balance": 100.00,
"currency": "USD",
"walletTransactionId": "c744cd1e-e1c3-4f6d-9905-752ab37a3ddd"
} Settlement Types
Settlement types in settlement request is used to determine the nature of the settlement in order to adjust player’s balance.
The settlement result can either increase the player’s balance or have no effect on it (if settlement amount is 0).
| Field | Type |
|---|---|
BET_PAID | The settlement amount should be added to the player’s balance as a result of the bet. If the amount is 0, it means the player lost the initial bet amount |
CASHOUT | Player cashes out before the bet event resulted. The player’s balance needs to be increased by the settlement amount |
VOIDED | Bet voided. The settlement amount should be added to the player’s balance |