| API Name |
PlaceBet |
| Notes |
- In case of a time-out, our implementation will retry 3 more times.
- In case a time-out transaction is already processed in the wallet and a retry takes place, the wallet will return the current state of the transaction.
- In case the three attempts fail, the player will receive an error.
- In case of -1 and 406 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.
- Amount will be pass as a negative number.
- Amount will be pass 0 for free games.
- In games with bonus money, the amount will be pass with 0 and the bonusamount with the value of bet using the bonus money (Coupon).
- freegame is used for identifying if the current game is under the free game section.
- gameRoundEnd is used for identifying if the current game is the last game section.
- 406 error code is returned for the placebet request, the RTG server shall cancel the bet and display an error to the player
- Warning:
- In case of retry, placebet with the same parameters such as transactionid will be sent. Verification on the received transactionid is crucial.
- Response's JSON structure should always follow the Success Response Example section.
|
| Path |
<WalletUrl>/account/placeBet |
| Method |
POST |
| Request Format |
URL |
| Return Format |
JSON |
| Header |
Content-Type: application/json |
| Request Parameters |
- amount : Double (Required) - Amount of the bet
- gameid : Integer (Required) - Unique identifier for a game
- roundid : String (Required) - Unique identifier for a round in the game
- currency : String (Required) - Player Currency Code
- transactionid : String (Required) - Transaction unique identifier
- membercode : String (Required) - Login
- token : String (Optional) - Game token
- freegame : Bit (Required) - Free game identifier (1=true; 0=false)
- gameroundend : Bit (Required) - Last game identifier (1=true; 0=false)
- sessionid : Integer (Required) - Session Id
- platformid : Integer (Optional) - Game platform that is currently running
- gamenum : Integer (Optional) - Unique identifier for a gameplay detail
- bonusamount : Double (Optional) - Bonus amount of the bet
- bonusroundid : String (Optional) - Unique identifier for a bonus round in the game
- bonuscode : String (Optional) - Code used to identify the specific bonus/coupon
- bonusplaythrough : Double (Optional) - Amount required to wager by the player to complete the coupon/bonus requirements
- bonusplaythroughbalance : Double (Optional) - Current balance corresponding to player wagers made so far
- bonusbalance : Double (Optional) - Current player's bonus balance
- bonusfreespinremaining : Integer (Optional) - Number of remaining free spins that the player needs to complete
- transactiondate : String (Optional) - The date and time when the transaction was created, expressed as "YYYY-MM-DDThh:mm:ss.SSS+hh:mm"
- utctransactiondate : String (Optional) - The date and time when the transaction was created in UTC, expressed as "YYYY-MM-DDThh:mm:ss.SSS+00:00"
|
| Request Example |
{
"amount": -1,
"gameid": 458761,
"roundid": "-9223372036854774281",
"currency": "USD",
"transactionid": "RTGS_-9223372036854774251",
"membercode": "mapuy4",
"token": "",
"freegame": false,
"gameroundend": false,
"sessionid": 20090,
"platformid": 3,
"gamenum": 0,
"bonusamount": 0,
"bonusroundid": "",
"bonuscode": "",
"bonusplaythrough": 0,
"bonusbalance": 0,
"bonusfreespinremaining": 0,
"bonusplaythroughbalance": 0,
"transactiondate":"2022-03-29T14:49:36.000Z",
"utctransactiondate": "2022-03-29T14:49:36.000+00:00"
}
|
| Success Response Example |
{
"code": 0,
"message": "success",
"balance": 9999.99,
"bonusbalance": 999.99,
"status": ""
}
|
| Error Response Example |
- Example 1: {"code":53, "message":"Player does not exist"}
- Example 2: {"code":100, "message":"Required field cannot be empty or null"}
- Example 3: {"code":104:, "message":"Invalid amount format"}
|
| Return Code |
- 0: No error
- 53: Player does not exist
- 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: Player's balance is insufficient to withdraw
- 405: External transactionID is duplicated in Main Wallet
- 406: "Invalid Bet Request"
- -1: Internal Server Error or any other error
|