Callback Notifications

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

FieldTypeDescription
typestringDEPOSIT OR WITHDRAW
statusstringCurrent transaction state — see the status tables below.
amountstringThe amount for which the order has been created.
amount_paidstringThe amount paid by the user (Deposit) or to the user (Withdraw)
amount_netstringPlease make sure you are using this field to reconcile any successful transaction and credit or debit the user.
currencystringCrypto asset symbol, e.g. USDT.
external_reference_idstringYour external_reference from the withdraw request. 'NA' for deposits
enduser_idstringThe enduser this transaction is attributed to, when one was supplied.
beneficiary_idstringThe whitelisted beneficiary the funds were sent to. 'NA' for deposits.
transaction_idstringUnique ID generated for each transaction by Bitolo
transaction_specificobjectChain details — network, transaction_hash, to_address.
checksumstringHMAC-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)

StatusMeaning
PENDINGValidated and recorded; not yet broadcast to the network.
PROCESSINGTransfer submitted to the blockchain.
SUCCESSConfirmed on-chain.
FAILEDRejected or failed; the debit is reversed.

Deposit (Receive)

StatusMeaning
SUCCESSCredited to your OTC balance
FAILEDDeposit 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:

  1. Take the payload fields without checksum.
  2. Sort the field names alphabetically: amount, amount_net, amount_paid, beneficiary_id, currency, enduser_id, external_reference_id, status, transaction_id, transaction_specific, type.
  3. Serialize each value:
    objects → compact JSON (no spaces), keys in the order delivered;
    everything else → its string form.
  4. Join the values with '|'
  5. Append SHA512(api_secret) in lowercase hex.
  6. 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:

  1. transaction_specific is serialized as compact JSON in the order it was delivered (network, transaction_hash, to_address) — not re-sorted.
  2. 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.

  1. Retries run on a scheduled job, once every five minutes, up to five attempts.
  2. Only the latest status per transaction is retried; an older queued status is dropped when a newer one fails.
  3. Once a callback is delivered successfully, any queued retries for that transaction are cleared.
  4. 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.