Appearance
Rollback POST
This request will be sent if the provider need to change the result of the ended round. You have to roll the state of the round status to running again. However, this can action both REFUND
and SETTLED
status. When the previous status is REFUND
you have to roll the canceled round to running again by reduced the balance that refunded. When the previous status is SETTLED
you have to roll the ended round to running again by reduced the balance that already win/lose.
HTTP Request
POST {{ YOUR_API_URL }}/rollback
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 |
Rollback transaction parameters (txns
)
Property | Type | Required | Description |
---|---|---|---|
id | string | Required | Bet ID |
status | string | Required | Bet status (Will be ROLLBACK) |
roundId | string | Required | Round id |
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. |
payoutAmount | number | Required | The amount that round need to rollback, use this value to update balance if previous status is SETTLED , player's balance will be reduced. |
betAmount | number | Required | The amount that round need to rollback, use this value to update balance if previous status is REFUND , player's balance will be reduced. |
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. | |||
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. | |||
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 request Product |
currency | string | Required | Player's currency codein ISO 4217 (Example: "THB" ) |
balanceBefore | number | Required | Player's balance before unsettle |
balanceAfter | number | Required | Player's balance after unsettle (deduct from payoutAmount - betAmount of previous settle request) |
username | string | Required | User id on agent system |
Request Example
Request Body
json
{
"id": "e75db240-d519-44dd-8e37-d68ec1c6f9b2",
"productId": "{{ Product ID }}",
"username": "foobar",
"currency": "THB",
"timestampMillis": 1645775403311,
"txns": [
{
"id": "9621055643135717",
"status": "ROLLBACK",
"roundId": "962105564",
"gameCode": "BB001",
"playInfo": "Player 1 Double",
"payoutAmount": 100,
"betAmount": 0,
"transactionType": "BY_ROUND"
}
]
}
JSON response example:
json
{
"id": "e75db240-d519-44dd-8e37-d68ec1c6f9b2",
"statusCode": 0,
"productId": "{{ Product ID }}",
"timestampMillis": 1645775403663,
"username": "foobar",
"currency": "THB",
"balanceBefore": 9997.5,
"balanceAfter": 9897.5
}
JSON response Fail example:
json
{
"id": "c7197ce4-5a50-4397-a903-d78b135ade4c",
"statusCode": 10001,
"productId": "{{ Product ID }}",
"timestampMillis": 1631599542878
}