Appearance
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
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 |
Adjust balance transaction parameters (txns
)
Property | Type | Required | Description |
---|---|---|---|
refId | string | Required | Transaction reference ID |
status | string | Required | Adjust status, have 2 values: |
1. DEBIT : You have to deduct player's balance. | |||
2. CREDIT : You have to increase player's balance. | |||
amount | number | Required | Balance amount to calculate the player's balance. |
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": "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"
}