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"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Fixed as "rollback" |
| uid | string | Yes | Player Account |
| roundId | string | Yes | Game round number of the original transaction |
| transferId | string | Yes | Identifier of the original transaction (expected to be removed) |
| betId | string | Yes | Bet ID, unique VP value |
| brand | string | Yes | Brand code, fixed as VP |
| gameCode | string | Yes | Game 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"
}
| Field | Type | Description |
|---|---|---|
| status | string | Status Code, see Status Code Description below |
| errText | string | Error message, empty string on success |
| balance | number | Player Balance after rollback |
| responseTime | string | Response time |
Response Status and Transaction Result
| Status | Determine Cancellation Status | Whether to trigger retry | Whether cancellation is successful | Bet Status |
|---|---|---|---|---|
| 0000 | Success | No | Confirmed | Cancelled |
| 9999 | Failure | Yes | Not confirmed | Cancelled |
| 1006 | Failure | Yes | Not confirmed | Cancelled |
| 2000 | Failure | Yes | Not confirmed | Cancelled |
| 2001 | Success | No | Confirmed | Cancelled |
| 2002 | Failure | Yes | Not confirmed | Cancelled |
| 2003 | Success | No | Not confirmed | Confirmed |
| Timeout | Failure | Yes | Not confirmed | Cancelled |
Important Notes
- Cancellation transaction trigger timing: This API is called to cancel a transaction when a Bet response times out
- 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.
- 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
- Status Description:
- Cancelled: Transaction successfully cancelled, not included in settlement
- Invalidated: Transaction Status is unclear, defaults to unsuccessful transaction, not included in settlement
- Parameter adjustment: transferId will be removed and replaced by betId