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
  • 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
  • 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
  • gamenum : Integer (Optional) - Unique identifier for a gameplay detail
  • platformid : Integer (Optional) - Game platform that is currently running
  • token : String (Optional) - Game token
  • 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
  • transactiondate : String (Optional) - The date and time when the transaction was created, expressed as "YYYY-MM-DDThh:mm:ss.SSS+hh:mm"
Request Example
{
    "amount": -1,
    "bonusamount": 0,
    "bonuscode": "",
    "bonusconverted": null,
    "bonusjackpotcontribution": null,
    "bonusplaythrough": 0,
    "bonusplaythroughbalance": 0,
    "bonusroundid": "",
    "currency": "USD",
    "freegame": 0,
    "gameid": 458761,
    "gamenum": 0,
    "gameroundend": 0,
    "isbonusroundend": null,
    "jackpotamount": 0,
    "jackpotcontribution": null,
    "maxbonusconversion": null,
    "membercode": "mapuy4",
    "platformid": 3,
    "roundid": "-9223372036854774281",
    "sessionid": 20090,
    "token": "",
    "transactionid": "RTGS_-9223372036854774251",
    "transactiondate": "2022-03-29T14:49:36.000Z"
}
                
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