Skip to main content

Rollback - Cancel Bet

Cancel or rollback executed transactions, typically used for game cancellations or system exceptions.

Request Parameters

Request Before Decryption

{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
info

For encryption details, refer to Operator API Implementation Guide

Request After Decryption

{
"action": "rollback",
"uid": "test123",
"roundId": "AAA123",
"transferId": "AAA123",
"betId": "AAA123",
"brand": "VP",
"gameCode": "VP_230036_1"
}
ParameterTypeRequiredDescription
actionstringYesFixed value "rollback"
uidstringYesPlayer Account
roundIdstringYesGame round number of the original transaction
transferIdstringYesIdentifier of the original transaction (planned for removal)
betIdstringYesBet ID, a unique value assigned by VP
brandstringYesBrand code, fixed value VP
gameCodestringYesGame Code

Response Format

info

The response is in plaintext JSON and does not need to be encrypted.

Success Response

{
"status": "0000",
"errText": "",
"balance": 12345.67,
"responseTime": "2024-12-11T01:23:38.271Z"
}
FieldTypeDescription
statusstringStatus code, see the status code description below
errTextstringError message, empty string when successful
balancenumberPlayer's Balance after the rollback
responseTimestringResponse time

Response Status and Transaction Result

StatusCancellation ResultWhether It Triggers a RetryWhether the Cancellation Is ValidBet Slip Status
0000SuccessNoValidCancelled
9999FailedYesInvalidVoided
1006FailedYesInvalidVoided
2000FailedYesInvalidVoided
2001SuccessNoValidCancelled
2002FailedYesInvalidVoided
2003SuccessNoInvalidValid
TimeoutFailedYesInvalidVoided

Important Notes

  1. Cancellation Trigger Timing: This API is called to cancel the transaction when the Bet response times out
  2. Processing Requirements: Upon receiving this API request, the Operator must cancel the specified Bet and return the updated Balance, or respond confirming that the Bet is valid
  3. Retry Mechanism: Retries will continue for up to four hours if no explicit error is received
  • For the first hour, retries occur at 1-minute intervals
  • For the following three hours, retries occur at 10-minute intervals
  1. Status Description:
  • Cancelled: The transaction was successfully cancelled and is not included in settlement
  • Voided: The transaction status is unclear; it defaults to an unsuccessful transaction and is not included in settlement
  1. Parameter Adjustment: transferId will be removed and replaced by betId