Appearance
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
Property | Type | Required | Description |
---|---|---|---|
id | string | Required | Request id |
timestampMillis | number | Required | Requesting time |
productId | string | Required | Product id associated with the request Product |
currency | string | Required | Player's currency code in ISO 4217 (Example: "THB" ) |
username | string | Required | User id on agent system |
txns | Txn[] | Required | Transaction id on agent system |
Place Bet transaction parameters (txns
)
Property | Type | Required | Description |
---|---|---|---|
id | string | Required | Transaction ID |
status | string | Required | Bet status (Usually OPEN or WAITING (if game is SPORT type)) |
roundId | string | Required | Round id |
betAmount | number | Required | Stake amount |
gameCode | string | Required | Game code |
playInfo | string | Required | Information 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. |
isFeature | boolean | Optional | The value indicates request is feature spin/game from provider. |
If isFeature: true possibly coming with betAmount: 0 (default value: false ) | |||
isFeatureBuy | boolean | Optional | The value indicates request is "buying" feature spin/game from provider. (default value: false ) |
skipBalanceUpdate | boolean | Optional | Flag indicating whether a round is this transaction need to update user's balance or not true : Don't update user's balancefalse : 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
Property | Type | Required | Description |
---|---|---|---|
id | string | Required | Response ID (No need to response the same request ID) |
statusCode | number | Required | Status from StatusCode |
timestampMillis | number | Required | Responding time |
productId | string | Required | Product id associated with the response Product |
currency | string | Required | Player's currency codein ISO 4217 (Example: "THB" ) |
balanceBefore | number | Required | Player's balance before bet |
balanceAfter | number | Required | Player's balance after bet |
username | string | Required | User 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
}