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

Request After Decryption

{
"action": "rollback",
"uid": "test123",
"roundId": "trans123",
"transferId": "trans123",
"betId": "rollback123",
"brand": "VP",
"gameCode": "VP_230036_1"
}
ParameterTypeRequiredDescription
actionstringYesFixed as "rollback"
uidstringYesPlayer Account
roundIdstringYesGame 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

The response is plaintext JSON, no encryption is 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 retryWhether cancellation is successfulBet Status
0000SuccessNoConfirmedCancelled
9999FailureYesNot confirmedCancelled
1006FailureYesNot confirmedCancelled
2000FailureYesNot confirmedCancelled
2001SuccessNoConfirmedCancelled
2002FailureYesNot confirmedCancelled
2003SuccessNoNot confirmedConfirmed
TimeoutFailureYesNot confirmedCancelled

Important Notes

  1. Cancellation transaction trigger timing: This API is called to cancel a transaction when a Bet response times out
  2. Processing requirements: When receiving this API request, the specified Bet needs to be cancelled and the updated Balance returned, or respond that the Bet is confirmed.
  3. Retry mechanism: Will continuously retry for four hours if no clear error is received
    • The first hour, every 1 minute
    • The next three hours, every 10 minutes
  4. Status Description:
    • Cancelled: Transaction successfully cancelled, not included in settlement
    • Invalidated: Transaction Status is unclear, defaults to unsuccessful transaction, not included in settlement
  5. Parameter adjustment: transferId will be removed and replaced by betId