Wallet IntegrationUnsettlement

Unsettlement

This method is used to unsettle a bet that was previously settled incorrectly. The unsettlement amount should be deducted from the player’s balance. Amount can be zero.

If the PAM either does not support balance deduction or player has no funds to cover, ‘INSUFFICIENT_FUNDS’ error response should be returned. In this case, the Sportsbook platform accumulates the uncollected clawback amount for the player and deducts it from future BET_PAID (settlement) amounts until it is fully recovered.

Request

  • Path: /unsettlement
  • Retried: yes
FieldTypeDescription
transactionIdstring (required)Unique transaction identifier. The basis of idempotency.
betIdstring (required)Unique identifier of bet. Can be used to correlate unsettlement with corresponding placebets and settlement(s)
playerIdstring (required)Unique player identifier in Operator’s PAM
amountdecimal (required)Amount to be deducted from the player’s balance
currencystring (required)Currency code of the amount
typeenum (required)Values: BET_UNPAID

Example Unettlement request - BET_UNPAID

POST https://{wallet base url}/unsettlement 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_UNPAID"
} 

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 Unsettlement response

{    
    "balance": 100.00,
    "currency": "USD",
    "walletTransactionId": "c744cd1e-e1c3-4f6d-9905-752ab37a3ddd"
}  

Example of a Unsettlement error response: 402 PAYMENT_REQUIRED

{
    "errorCode": "INSUFFICIENT_FUNDS",
    "description": "The player does not have sufficient funds"
}

Unsettlement Types

Unsettlement types in unsettlement request is used to determine the purpose of the unsettlement. For now only BET_UNPAID is supported.

Result of unsettlement can either be deduction or no effect on player’s balance.

FieldType
BET_UNPAIDThe unsettlement amount should be deducted from the player’s balance. If the amount is zero, it means the player’s balance should remain unchanged.