Callback Responses
This page provides detailed instructions on how to respond appropriately.
Last updated
This page provides detailed instructions on how to respond appropriately.
Last updated
If you use Money Transfer Mode, you don't need to read this page.
Once our API sends a callback request to your casino's backend, you need to parse it accurately and respond appropriately.
Before parsing the JSON data from our callback request body, you need to validate certain data in your database. To do this, first read the check
field, split the string by commas, and validate each check case accordingly.
The JSON structure of your response is critical for our API, as we rely on predefined rules to parse it correctly. Please ensure that your response adheres to the specified JSON format. Many developers overlook this detail and subsequently encounter 'CALLBACK_ERROR'.
Timeout Caution
In case of COMMAND bet
and balance
, the response must be delivered within 2 seconds
For the other COMMANDs, the response must be delivered within 4 seconds
There should be 5 types of validation in your code.
Check | Description | Response Format (If Validation Fails) |
---|---|---|
If validation is successful, you can execute actions based on the command
codes provided in our callback request body.
The authenticate
, balance
, status
commands will always succeed, if validation is passed.
For a deeper understanding of how to parse our callback request, please refer to the Seamless Integration Code Examples page.
Command | Response Format (Success) | Response Format (Fail) |
---|---|---|
21
Check if a player is authenticated.
{"result": 21, "status": "ERROR"}
22
Check if a player is activated.
{"result": 22, "status": "ERROR"}
31
Check if a player's balance is sufficient.
{"result": 31, "status": "ERROR", "data": {"balance": 0}}
41
Check if a transaction has already been processed.
{"result": 41, "status": "ERROR", "data": {"balance": 0}}
42
Check if a transaction is initialized.
{"result": 42, "status": "ERROR", "data": {"balance": 0}}
authenticate
{"result": 0, "status": "OK", "data": {"account": "test1234", "balance": 100}}
balance
{"result": 0, "status": "OK", "data": {"balance": 100}}
bet
{"result": 0, "status": "OK", "data": {"balance": 100}}
{"result": 99, "status": "ERROR", "data": {"balance": 100}}
win
{"result": 0, "status": "OK", "data": {"balance": 100}}
{"result": 99, "status": "ERROR", "data": {"balance": 100}}
cancel
{"result": 0, "status": "OK", "data": {"balance": 100}}
{"result": 99, "status": "ERROR", "data": {"balance": 100}}
status
Transaction is succeeded:
{"result": 0, "status": "OK", "data": {"trans_id": 1676358191, "trans_status: "OK"}}
Transaction is canceled:
{"result": 0, "status": "OK", "data": {"trans_id": 1676358191, "trans_status: "CANCELED"}}