Skip to content

Adjust balance POST

In a game that have to deposit/withdraw credit before play the game (e.g. Fishing type). We uses this callback to operates an action. Please carefully check the refId as a duplicates reference. Sometimes this callback can call to your side concurrenry, you have to check player's balance before send the success to our system.

HTTP Request

POST {{ YOUR_API_URL }}/adjustBalance

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

Adjust balance transaction parameters (txns)

PropertyTypeRequiredDescription
refIdstringRequiredTransaction reference ID
statusstringRequiredAdjust status, have 2 values:
1. DEBIT: You have to deduct player's balance.
2. CREDIT: You have to increase player's balance.
amountnumberRequiredBalance amount to calculate the player's balance.

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": "46a0a0da-22c9-4016-94bd-d80ab6d97026",
  "productId": "{{ Product ID }}",
  "username": "foobar",
  "currency": "THB",
  "timestampMillis": 1631599542778,
  "txns": [
    {
      "refId": "e7de2c76-f534-473d-b8fb-f5c901a3c582",
      "status": "DEBIT",
      "amount": 1500
    }
  ]
}

JSON response example:

json
{
  "id": "c7197ce4-5a50-4397-a903-d78b135ade4c",
  "statusCode": 0,
  "timestampMillis": 1631599542821,
  "productId": "{{ Product ID }}",
  "currency": "THB",
  "balanceBefore": 10000,
  "balanceAfter": 8500,
  "username": "foobar"
}