| API Name |
CancelBet |
| Notes |
- In case of -1 and 406 place bet wallet errors or after a successfully placeBet request but a game error a cancel bet process will be triggered asynchronously to refund the bet amount to the player.
|
| Path |
<WalletUrl>/account/cancelBet |
| Method |
POST |
| Request Format |
URL |
| Return Format |
JSON |
| Header |
Content-Type: application/json |
| Request Parameters |
- amount : double (Required) - Amount of the bet
- currency : String (Required) - Player Currency Code
- gameid : String (Required) - Unique identifier for a game
- membercode : String (Required) - Login
- roundid : String (Required) - Unique identifier for a round in the game
- transactionid : String (Required) - Transaction unique identifier
- txnreferenceid : String (Required) - Transaction identifier of the bet transaction to cancel
- freegame : Bit (Required) - Free game identifier (1=true; 0=false)
- gameroundend : Bit (Required) - Last game identifier (1=true; 0=false)
- sessionid : String (Required) - Session Id
|
| Request Example |
{
"amount": -1,
"bonusamount": 0,
"currency": "USD",
"gameid": 458761,
"membercode": "mapuy4",
"platformid": 3,
"roundid": "-9223372036854774281",
"sessionid": 20090,
"transactionid": "RTGS_-9223372036854774253",
"txnreferenceid": "RTGS_-9223372036854774251",
"transactiondate": "2022-03-29T14:49:36.000Z"
}
|
| Success Response Example |
{
"code": 0,
"message": "success",
"balance": 9999.99,
"bonusbalance": 999.99,
"status": ""
}
|
| Error Codes |
- 0: No error
- 53: The transaction belongs to another player and has already been canceled.
- 100: Required field cannot be empty or null.
- 104: Invalid amount format.
- 105: Invalid external transaction id, its length cannot be more than 100 characters.
- 404: No player found that matches this transaction.
- 405: The transaction has already been canceled.
- 406: "Invalid Cancel Request"
- -1: Internal Server Error or any other error
|