Appearance
Settle Bets POST
This request usually sent to your system after /placeBets
was called and response success. SuperAPI sent the round result. You can check the payoutAmount
and increase the player's balance after that please response success to our system to allow player play in a next round.
Some product (e.g. PGSOFT
, etc) has only this request to complete the round, the round do not start by /placeBets
we will sent both betAmount
and payoutAmount
to your system. You have to check player's balance by betAmount
first. If they have enough balance to player, check the payoutAmount
to identified is player win or lose (normally, if betAmount
> 0 and payoutAmount
> betAmount
, the player is win)
Product Single State
Product ID | Product Name |
---|---|
PGSOFT | PG Soft |
BOOMING | Booming |
GIOCO | Gioco Plus |
I8 | I8 |
AFB1188_SLOT | AFB1188 (Slot) |
FACHAI | Fachai |
759GAMING | 759 Gaming |
ASKMEBET | Askmebet |
MINILUCK | Miniluck |
HTTP Request
POST {{ YOUR_API_URL }}/settleBets
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 |
Settle Bet transaction parameters (txns
)
Property | Type | Required | Description |
---|---|---|---|
id | string | Required | Transaction ID |
status | string | Required | Bet status (Always SETTLED ) |
roundId | string | Required | Round ID |
betAmount | number | Required | Stake amount (Sometimes this value equal to 0 because we can't identify the betAmount from /placeBets request) |
payoutAmount | number | Required | Payout amount (stake + win 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. |
turnOver | number | Required | Turn over (some product call valid stake, valid bet, etc.) for each round. |
If system can identify turn-over from provider, this value should not be 0 (Default value is 0 ). | |||
Note: Please test each product to check the real turn-over value before use this value. | |||
isSingleState | boolean | Required | Value indicates whether the round for this request is end in single /settleBets request (No /placeBets , it's mean the round has no OPEN status) Product |
transactionType | string | Required | The value that indicate transaction action, have 2 values: |
1. BY_TRANSACTION : This type, you have to consider the action is a transaction-level.Example | |||
Find the transaction inside your data storage using id and action only found transaction. | |||
2. BY_ROUND : This type, you have to consider the action is a round-level.Example | |||
Find entire transactions that belongs to roundId and actions all transactions at once. | |||
isEndRound | boolean | Optional | Value indicates whether a round is end round or not (The default value is false ) |
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 | 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 settle |
balanceAfter | number | Required | Player's balance after settle |
username | string | Required | User id on agent system |
Request Example
Request Body
json
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"username": "foobar",
"currency": "THB",
"timestampMillis": 1712767012000,
"txns": [
{
"id": "T-002",
"status": "SETTLED",
"roundId": "R-0001",
"betAmount": 0,
"turnOver": 0,
"payoutAmount": 5000,
"gameCode": "10300",
"playInfo": "Golden Coyote",
"isEndRound": false,
"isSingleState": false,
"skipBalanceUpdate": false,
"transactionType": "BY_ROUND"
}
]
}
JSON response example:
json
{
"id": "37e10565-ca3f-4367-b3ad-c6aa2f01ffd0",
"statusCode": 0,
"productId": "{{ Product ID }}",
"timestampMillis": 1712767012100,
"username": "foobar",
"currency": "THB",
"balanceBefore": 9800,
"balanceAfter": 14800
}
JSON response Fail example:
json
{
"id": "c7197ce4-5a50-4397-a903-d78b135ade4c",
"statusCode": 10001,
"productId": "{{ Product ID }}",
"timestampMillis": 1631599542878
}
Request Example (BY_TRANSACTION)
Request Body
json
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564361,
"username": "testuser1",
"txns": [
{
"id": "x425atj33k8psk",
"status": "OPEN",
"roundId": "j6nfiubzcer1c8",
"betAmount": 10,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"skipBalanceUpdate": false
}
]
}
------------------------------------------------
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564453,
"username": "testuser1",
"txns": [
{
"id": "z2l8kx8zzjxrm3",
"status": "OPEN",
"roundId": "j6nfiubzcer1c8",
"betAmount": 5,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"skipBalanceUpdate": false
}
]
}
------------------------------------------------
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564453,
"username": "testuser1",
"txns": [
{
"id": "7f1e0i1lesr9yv",
"status": "OPEN",
"roundId": "j6nfiubzcer1c8",
"betAmount": 20,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"skipBalanceUpdate": false
}
]
}
------------------------------------------------
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564735,
"username": "testuser1",
"txns": [
{
"id": "x425atj33k8psk",
"status": "SETTLED",
"roundId": "j6nfiubzcer1c8",
"betAmount": 0,
"payoutAmount": 20,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"isSingleState": false,
"transactionType": "BY_TRANSACTION",
"turnOver": 0
}
]
}
------------------------------------------------
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564820,
"username": "testuser1",
"txns": [
{
"id": "z2l8kx8zzjxrm3",
"status": "SETTLED",
"roundId": "j6nfiubzcer1c8",
"betAmount": 0,
"payoutAmount": 0,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"isSingleState": false,
"transactionType": "BY_TRANSACTION",
"turnOver": 0
}
]
}
------------------------------------------------
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564820,
"username": "testuser1",
"txns": [
{
"id": "7f1e0i1lesr9yv",
"status": "SETTLED",
"roundId": "j6nfiubzcer1c8",
"betAmount": 0,
"payoutAmount": 10,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"isSingleState": false,
"transactionType": "BY_TRANSACTION",
"turnOver": 0
}
]
}
Request Example (BY_ROUND)
Request Body
json
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564361,
"username": "testuser1",
"txns": [
{
"id": "x425atj33k8psk",
"status": "OPEN",
"roundId": "j6nfiubzcer1c8",
"betAmount": 10,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"skipBalanceUpdate": false
}
]
}
------------------------------------------------
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564453,
"username": "testuser1",
"txns": [
{
"id": "z2l8kx8zzjxrm3",
"status": "OPEN",
"roundId": "j6nfiubzcer1c8",
"betAmount": 5,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"skipBalanceUpdate": false
}
]
}
------------------------------------------------
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114564453,
"username": "testuser1",
"txns": [
{
"id": "7f1e0i1lesr9yv",
"status": "OPEN",
"roundId": "j6nfiubzcer1c8",
"betAmount": 20,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"skipBalanceUpdate": false
}
]
}
------------------------------------------------
{
"id": "26cf1ce1-8ee1-4bbf-9d42-872631054bcf",
"productId": "{{ Product ID }}",
"currency": "THB",
"timestampMillis": 1756114565578,
"username": "testuser1",
"txns": [
{
"id": "zkudwpstubzc3f",
"status": "SETTLED",
"roundId": "uskpir866lcc6l",
"betAmount": 0,
"payoutAmount": 50,
"gameCode": "d5qfgs4amfxf6",
"playInfo": "Respin Mania",
"isSingleState": false,
"transactionType": "BY_ROUND",
"turnOver": 0
}
]
}