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
FieldTypeDescription
transactionIdstring (required)Unique transaction identifier. The basis of idempotency.
betIdstring (required)Unique identifier of bet. Can be used to correlate bet with corresponding settlement(s) and unsettlement(s)
playerIdstring (required)Unique player identifier in Operator’s PAM
amountdecimal (required)Amount to be added to player’s balance. Can be 0.
currencystring (required)Currency code of the bet amount
typeenum (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

FieldTypeDescription
balancedecimal (required)Player’s current balance in player’s currency
currencystring (required)Currency code for player’s balance
walletTransactionIdstringWallet (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).

FieldType
BET_PAIDThe 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
CASHOUTPlayer cashes out before the bet event resulted. The player’s balance needs to be increased by the settlement amount
VOIDEDBet voided. The settlement amount should be added to the player’s balance