Skip to content

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

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

Rollback transaction parameters (txns)

PropertyTypeRequiredDescription
idstringRequiredBet ID
statusstringRequiredBet status (Will be ROLLBACK)
roundIdstringRequiredRound id
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.
payoutAmountnumberRequiredThe amount that round need to rollback, use this value to update balance if previous status is SETTLED, player's balance will be reduced.
betAmountnumberRequiredThe amount that round need to rollback, use this value to update balance if previous status is REFUND, player's balance will be reduced.
transactionTypestringRequiredThe 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

PropertyTypeRequiredDescription
idstringRequiredRequest id
statusCodenumberRequiredStatus from StatusCode
timestampMillisnumberRequiredResponding time
productIdstringRequiredProduct id associated with the request Product
currencystringRequiredPlayer's currency codein ISO 4217 (Example: "THB")
balanceBeforenumberRequiredPlayer's balance before unsettle
balanceAfternumberRequiredPlayer's balance after unsettle (deduct from payoutAmount - betAmount of previous settle request)
usernamestringRequiredUser 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
}