Callbacks

Callbacks are used for retrieving state changes of initiated processes on specific URLs.

Types and statuses in callbacks

Transaction types: deposit / withdrawal / incoming / outgoing

Transaction statuses: new / processing / executed* / cancelled*

Operation types: deposit / withdrawal / exchange

Operation statuses: new / processing / executed* / cancelled*

*final statuses

Callback authorization

As an additional security layer, a Callback token can be generated, and received callbacks will have a X_SIGNATURE in the header.

The value of X_SIGNATURE is a callback body (JSON string), signed by the Callback token HMAC-SHA256.

circle-info

The callback token is displayed only once, when you generate/re-generate it in the Settings->Integration->Callback token for Tunell Gateway section (Business Dashboard).

You can validate the X_SIGNATURE generation logic by comparing the result with the provided example.

Example:

Callback token: db80953ab79860450a75c35c56cc79bf
Callback body: {"id":"31d236fc-a1fe-4288-8896-ea385659b40c","referenceId":"Outgoing_Ref_102","type":"outgoing","amount":100,"amountType":"purchase","status":"processing","statusNote":null,"timestampCreated":"2022-01-01 00:00:00.000001 +03:00","timestampUpdated":"2022-01-01 00:00:00.000001 +03:00","operations":[{"id":1003,"type":"exchange","status":"processing","currency":"USDT_ERC20","exchangeFrom":"EUR","amount":97.713505,"rate":1.0234,"amountFinal":100}],"callbackId":13}
X_SIGNATURE: a2cc5fe1841f1f6a0a32ff0779cb6939dea6f5ac9f656b938c54a187bb4a1105

Callback examples

Note: the second callback will have the "executed" operation depending on what was executed first - exchange or deposit

Last updated