Skip to content

Place Bets POST

When player play or place bet on the Game GUI, system will sent this request to your system callback url (That you set on the Backoffice site) You have to check player's balance. If they have enough balance, please deduct their balance and response success to our system to continue the game flow.

HTTP Request

POST {{ YOUR_API_URL }}/placeBets

Content Type

Type: application/json

Parameter Description

PropertyTypeRequiredDescription
idstringRequiredRequest id
timestampMillisnumberRequiredRequesting time
productIdstringRequiredProduct id associated with the request Product
currencystringRequiredPlayer's currency code in ISO 4217 (Example: "THB")
usernamestringRequiredUser id on agent system
txnsTxn[]RequiredTransaction id on agent system

Place Bet transaction parameters (txns)

PropertyTypeRequiredDescription
idstringRequiredTransaction ID
statusstringRequiredBet status (Usually OPEN or WAITING (if game is SPORT type))
roundIdstringRequiredRound id
betAmountnumberRequiredStake amount
gameCodestringRequiredGame code
playInfostringRequiredInformation regarding the player was chosen. If Live-casino game this should be the position that player wager on that round if system can identified the position (e.g. player, banker). Other games, the value should be the game name, if we can't identified game name or game code, we will send 'UNKNOWN' into this value.
isFeaturebooleanOptionalThe value indicates request is feature spin/game from provider.
If isFeature: true possibly coming with betAmount: 0 (default value: false)
isFeatureBuybooleanOptionalThe value indicates request is "buying" feature spin/game from provider. (default value: false)
skipBalanceUpdatebooleanOptionalFlag indicating whether a round is this transaction need to update user's balance or not
true: Don't update user's balance
false: Update user's balance with betAmount or payoutAmount.
Usually occur in SPORT game type, when provider considering the player's wagering on the game.
(default value: false)

Response Description

PropertyTypeRequiredDescription
idstringRequiredResponse ID (No need to response the same request ID)
statusCodenumberRequiredStatus from StatusCode
timestampMillisnumberRequiredResponding time
productIdstringRequiredProduct id associated with the response Product
currencystringRequiredPlayer's currency codein ISO 4217 (Example: "THB")
balanceBeforenumberRequiredPlayer's balance before bet
balanceAfternumberRequiredPlayer's balance after bet
usernamestringRequiredUser id on agent system

Request Example

Request Body

json
{
  "id": "6849b62b-2b52-472a-88a4-c26c3371a62a",
  "productId": "{{ Product ID }}",
  "username": "foobar",
  "currency": "THB",
  "timestampMillis": 1712760660000,
  "txns": [
    {
      "id": "T-001",
      "gameCode": "10300",
      "status": "OPEN",
      "roundId": "R-0001",
      "betAmount": 200,
      "playInfo": "Golden Coyote",
      "isFeature": false,
      "isFeatureBuy": false
    }
  ]
}

JSON response Success example:

json
{
  "id": "279478c1-c870-407e-91be-b70bf6a623f9",
  "statusCode": 0,
  "timestampMillis": 1712760660100,
  "productId": "{{ ProductID }}",
  "currency": "THB",
  "balanceBefore": 10000,
  "balanceAfter": 9800,
  "username": "foobar"
}

JSON response Fail example:

json
{
  "id": "c7197ce4-5a50-4397-a903-d78b135ade4c",
  "statusCode": 10001,
  "productId": "{{ Product ID }}",
  "timestampMillis": 1631599542878
}