Appearance
Cancel Bets POST
Provider will send the user's cancel information when bet have a problem or timeout.
HTTP Request
POST {{ YOUR_API_URL }}/cancelBets
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 |
Cancel Bet transaction parameters (txns
)
Property | Type | Required | Description |
---|---|---|---|
id | string | Required | Transaction ID |
status | string | Required | Adjust status, have 2 values: |
1. REFUND : The cancel status, this status come after the OPEN status. When your system got this status, you need to cancel the OPEN transaction and refund the balance to the user. | |||
2. REJECT : The reject status, this status come after the WAITING status. This status mean the sport's provider reject the bet.The causes of this status are: | |||
2.1. Odds changing before your bet was confirmed. | |||
2.2. Market already closed. | |||
2.3. System or risk control rejecting the wager. | |||
roundId | string | Required | Round id |
betAmount | number | Required | Stake amount, you can use this value to refund to your player's balance. |
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. |
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. | |||
2. BY_ROUND : This type, you have to consider the action is a round-level. | |||
Find entire transactions that belongs to roundId and actions all transactions at once. |
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 cancel |
balanceAfter | number | Required | Player's balance after cancel |
username | string | Required | User id on agent system |
Request Example
Request Body
json
{
"id": "c7197ce4-5a50-4397-a903-d78b135ade4v",
"productId": "{{ Product ID }}",
"username": "foobar",
"currency": "THB",
"timestampMillis": 1712767745000,
"txns": [
{
"id": "R-0001",
"status": "REFUND",
"roundId": "R-0001",
"betAmount": 200,
"gameCode": "10300",
"playInfo": "Golden Coyote",
"transactionType": "BY_ROUND"
}
]
}
JSON response example:
json
{
"id": "c7197ce4-5a50-4397-a903-d78b135ade4c",
"statusCode": 0,
"timestampMillis": 1712767745100,
"productId": "{{ Product ID }}",
"currency": "THB",
"balanceBefore": 14800,
"balanceAfter": 10000,
"username": "foobar"
}
JSON response Fail example:
json
{
"id": "c7197ce4-5a50-4397-a903-d78b135ade4c",
"statusCode": 10001,
"productId": "{{ Product ID }}",
"timestampMillis": 1631599542878
}