Rollback Bet

Method to perform rollback of the previous bet. rollbackbet is sent when a placebet request fails with an unexpected error or times out. If no matching bet is found for the given betId, a success response should be returned to indicate that the initial bet never reached PAM.

Request

  • Path: /rollbackbet
  • Retried: Yes
FieldTypeDescription
transactionIdstring (required)Unique transaction identifier. The basis of idempotency.
betIdstring (required)Unique identifier of the bet being rolled back
playerIdstring (required)Unique player identifier in Operator’s PAM
typestring (required)Rollback reason. Value: TECHNICAL_ERROR
transactionDatedatetime (required)The actual date when the transaction created and saved into the Sportsbook database.

Example RollbackBet request

POST https://{wallet base url}/rollbackbet 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",
    "type": "TECHNICAL_ERROR"
}

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

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

Error Response

On error, the wallet returns an HTTP error status (4xx/5xx) with only errorCode and description.

{
    "errorCode": "INVALID_PLAYER",
    "description": "Player is either invalid or not found"
}

See Error Handling for all applicable error codes.