Callback notifications(webhooks) allow your application to receive real-time updates about OTC transfer events.
We notify your server of every OTC crypto transaction state change by POSTing a JSON payload to the active notification URL configured for your merchant account (see Transfers- Callback section). Only one notification URL can be active at a time.
Callbacks are sent for both crypto deposits (receive) and crypto withdrawals (send).
ℹ️ Deposits always send a callback, both when initiated via dashboard and api
ℹ️ Withdrawals send a callback only when initiated through the API. Withdrawals made from the OTC dashboard do not.
ℹ️ If no active notification URL is configured, no callback is sent.
Callback Payload
| Field | Type | Description |
|---|---|---|
| type | string | DEPOSIT OR WITHDRAW |
| status | string | Current transaction state — see the status tables below. |
| amount | string | The amount for which the order has been created. |
| amount_paid | string | The amount paid by the user (Deposit) or to the user (Withdraw) |
| amount_net | string | Please make sure you are using this field to reconcile any successful transaction and credit or debit the user. |
| currency | string | Crypto asset symbol, e.g. USDT. |
| external_reference_id | string | Your external_reference from the withdraw request. 'NA' for deposits |
| enduser_id | string | The enduser this transaction is attributed to, when one was supplied. |
| beneficiary_id | string | The whitelisted beneficiary the funds were sent to. 'NA' for deposits. |
| transaction_id | string | Unique ID generated for each transaction by Bitolo |
| transaction_specific | object | Chain details — network, transaction_hash, to_address. |
| checksum | string | HMAC-style signature over the payload — see Checksum Validation. |
Example — Withdraw (send)
{
"type": "WITHDRAW",
"status": "SUCCESS",
"amount": "125.5",
"amount_paid": "125.5",
"amount_net": "125.5",
"currency": "USDT",
"external_reference_id": "MERCHANT-REF-000123",
"enduser_id": "47f8a7ac-5aa4-4388-8412-f36656257a03",
"beneficiary_id": "b4c8e2f1-9a67-4d30-8e15-7f2c9b1d4a86",
"transaction_id": "87f8a7ac-6aa4-3388-7412-436656258b03",
"transaction_specific": {
"network": "TRC20",
"transaction_hash": "a1b2c3d4e5f60718293a4b5c6d7e8f901a2b3c4d5e6f708192a3b4c5d6e7f801",
"to_address": "TXn9Yv8hK2pQ4mRfL7sD3bW6cE1gZ5aU2v"
},
"checksum": "F4BE7E00093B8A420A5996AB99DAFF324485BAE15C887197952AF324A54ABF0E57EF24314781FBEE94666BE00EF53D1B9CF751187FCF178515D57AC74F59BAE2"
}{
"type": "WITHDRAW",
"status": "FAILED",
"amount": "125.5",
"amount_paid": "125.5",
"amount_net": "125.5",
"currency": "USDT",
"external_reference_id": "MERCHANT-REF-000123",
"enduser_id": "NA",
"beneficiary_id": "b4c8e2f1-9a67-4d30-8e15-7f2c9b1d4a86",
"transaction_id": "87f8a7ac-6aa4-3388-7412-436656258b03",
"transaction_specific": {
"network": "TRC20",
"transaction_hash": "NA",
"to_address": "TXn9Yv8hK2pQ4mRfL7sD3bW6cE1gZ5aU2v"
},
"checksum": "8D2F4A6C8E0B1D3F5A7C9E0B2D4F6A8C0E2B4D6F8A0C2E4B6D8F0A2C4E6B8D0F2A4C6E8B0D2F4A6C8E0B1D3F5A7C9E0B2D4F6A8C0E2B4D6F8A0C2E4B6D8F0A"
}Example — Deposit (receive)
{
"type": "DEPOSIT",
"status": "SUCCESS",
"amount": "500",
"amount_paid": "125.5",
"amount_net": "125.5",
"currency": "USDT",
"external_reference_id": "NA",
"enduser_id": "47f8a7ac-5aa4-4388-8412-f36656257a03",
"beneficiary_id": "NA",
"transaction_id": "97f8a7ac-1aa4-2388-7412-736656258b03",
"transaction_specific": {
"network": "TRC20",
"transaction_hash": "9f8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a39281706f5e4d3c2b1a0",
"to_address": "TQm4Bc7kR1nX9dP2sV6hL8wY3zA5uJ0tE7"
},
"checksum": "1C3D5E7F9A0B2D4F6180A2C4E608A1B3D5F70921A3C5E7F90B2D4F6081A3C5E7F90B2D4F6081A3C5E79B0D2F4681A3C5E7F90B2D4F6081A3C5E7F90B2D4F60"
}Transaction Statuses
Withdraw (Send)
| Status | Meaning |
|---|---|
| PENDING | Validated and recorded; not yet broadcast to the network. |
| PROCESSING | Transfer submitted to the blockchain. |
| SUCCESS | Confirmed on-chain. |
| FAILED | Rejected or failed; the debit is reversed. |
Deposit (Receive)
| Status | Meaning |
|---|---|
| SUCCESS | Credited to your OTC balance |
| FAILED | Deposit could not be credited |
Checksum Validation
The checksum is an uppercase SHA512 digest, computed over the payload excluding the checksum field itself, combined with your OTC api_secret.
Algorithm:
- Take the payload fields without checksum.
- Sort the field names alphabetically: amount, amount_net, amount_paid, beneficiary_id, currency, enduser_id, external_reference_id, status, transaction_id, transaction_specific, type.
- Serialize each value:
objects → compact JSON (no spaces), keys in the order delivered;
everything else → its string form. - Join the values with '|'
- Append SHA512(api_secret) in lowercase hex.
- checksum = SHA512(
Concatenation example:
// Note: line-wrapped for readability
125.5|125.5|125.5|b4c8e2f1-9a67-4d30-8e15-7f2c9b1d4a86|USDT|47f8a7ac-5aa4-4388-8412-f36656257a03|
MERCHANT-REF-000123|SUCCESS|87f8a7ac-6aa4-3388-7412-436656258b03|{"network":"TRC20",
"transaction_hash":"a1b2c3d4e5f60718293a4b5c6d7e8f901a2b3c4d5e6f708192a3b4c5d6e7f801",
"to_address":"TXn9Yv8hK2pQ4mRfL7sD3bW6cE1gZ5aU2v"}|
WITHDRAW|<sha512(api_secret)>import hashlib
import json
def verify_checksum(payload: dict, api_secret: str) -> bool:
data = {k: v for k, v in payload.items() if k != "checksum"}
hashed_secret = hashlib.sha512(api_secret.encode("utf-8")).hexdigest()
raw = ""
for key in sorted(data.keys()):
value = data[key]
if isinstance(value, (dict, list)):
value = json.dumps(value, separators=(",", ":"))
raw += f"{value}|"
raw += hashed_secret
expected = hashlib.sha512(raw.encode("utf-8")).hexdigest().upper()
return expected == payload.get("checksum")const crypto = require("crypto");
function verifyChecksum(payload, apiSecret) {
const { checksum, ...data } = payload;
const hashedSecret = crypto
.createHash("sha512")
.update(apiSecret)
.digest("hex");
let raw = "";
for (const key of Object.keys(data).sort()) {
const value = data[key];
if (typeof value === "object") {
raw += JSON.stringify(value) + "|"; // compact JSON, delivered key order
} else {
raw += String(value) + "|";
}
}
raw += hashedSecret;
const expected = crypto
.createHash("sha512")
.update(raw)
.digest("hex")
.toUpperCase();
return expected === checksum;
}<?php
function verifyChecksum(array $payload, string $apiSecret): bool {
$checksum = $payload["checksum"] ?? "";
unset($payload["checksum"]);
$hashedSecret = hash("sha512", $apiSecret);
ksort($payload);
$raw = "";
foreach ($payload as $value) {
if (is_array($value) || is_object($value)) {
$raw .= json_encode($value, JSON_UNESCAPED_SLASHES) . "|";
} else {
$raw .= $value . "|";
}
}
$raw .= $hashedSecret;
return strtoupper(hash("sha512", $raw)) === $checksum;
}
⚠️ Things to note:
- transaction_specific is serialized as compact JSON in the order it was delivered (network, transaction_hash, to_address) — not re-sorted.
- Sign the payload exactly as received.
Expected Merchant Response
Respond with any 2xx status code to acknowledge receipt. Any error status codes, a connection failure, or a timeout is treated as a failed delivery.
Retry Mechanism
If a delivery fails, only terminal callbacks (SUCCESS / FAILED) are queued for retry. Transient PENDING / PROCESSING callbacks are not retried — the next state change supersedes them.
- Retries run on a scheduled job, once every five minutes, up to five attempts.
- Only the latest status per transaction is retried; an older queued status is dropped when a newer one fails.
- Once a callback is delivered successfully, any queued retries for that transaction are cleared.
- After the attempts are exhausted, the callback is dropped. Reconcile via the transaction listing endpoints, or request a manual resend from support.
Before updating any transaction status in your system, please verify the latest status using our Transaction Status Check API. This ensures accurate and synchronised transaction status between both our systems.