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 description, please refer to [Operator API Implementation Guide](./overview.md#1-Security Requirements)

Request After Decryption

{
"action": "rollback",
"uid": "test123",
"roundId": "AAA123",
"transferId": "AAA123",
"betId": "AAA123",
"brand": "VP",
"gameCode": "VP_230036_1"
}
ParameterTypeRequiredDescription
actionstringYesFixed as "rollback"
uidstringYesPlayer Account
roundIdstringYesGames Round Number of the original transaction
transferIdstringYesIdentifier of the original transaction (expected to be removed)
betIdstringYesBet ID, unique VP value
brandstringYesBrand code, fixed as VP
gameCodestringYesGame Code

Response Format

info

Response is plaintext JSON, no encryption required.

Success Response

{
"status": "0000",
"errText": "",
"balance": 12345.67,
"responseTime": "2024-12-11T01:23:38.271Z"
}
FieldTypeDescription
statusstringStatus Code, see Status Code Description below
errTextstringError message, empty string on Success
balancenumberPlayer Balance after rollback
responseTimestringResponse Time

Response Status and Transaction Result

StatusDetermine Cancellation StatusWhether to Trigger RetryIs Cancellation EstablishedBet Slip Status
0000SuccessNoEstablishedCanceled
9999FailedYesNot EstablishedCanceled
1006FailedYesNot EstablishedCanceled
2000FailedYesNot EstablishedCanceled
2001SuccessNoEstablishedCanceled
2002FailedYesNot EstablishedCanceled
2003SuccessNoNot EstablishedEstablished
TimeoutFailedYesNot EstablishedCanceled

Important Notes

  1. Transaction Cancellation Trigger Timing: When Bet response times out, this API will be called to cancel the transaction
  2. Processing Requirements: Upon receiving this API request, the specified Bet must be canceled and the updated Balance returned, or the Bet must be confirmed as established
  3. Retry Mechanism: If no clear error is received, retries will continue for four hours
  • First hour, 1-minute interval per retry
  • Next three hours, 10-minute interval per retry
  1. Status Description:
  • Canceled: Transaction cancellation Success, not included in settlement
  • Canceled: Transaction Status unclear, defaulted to unsuccessful transaction, not included in settlement
  1. Parameter Adjustment: transferId will be removed and replaced by betId