For developers

Webhook documentation

Xclusor POSTs a signed JSON event to your server when an invoice is paid, so you can fulfil orders automatically.

Set up an endpoint

  1. In the dashboard, open Webhooks and add your HTTPS URL.
  2. Copy the signing secret — it is shown only once.
  3. Return any 2xx status quickly once you've stored the event.

URLs must be public HTTPS addresses; private, loopback and cloud-metadata IPs are rejected, and redirects are not followed.

The event

POST /your/webhook
Content-Type: application/json
Xclusor-Signature: t=1733500000,v1=5f2b…c9
User-Agent: Xclusor-Webhook/1

{
  "id": "evt_…_paid",
  "type": "invoice.paid",
  "created": 1733500000,
  "data": {
    "invoice": {
      "id": "aZ3f…",
      "network": "tron",
      "asset": "usdt",
      "amount": "25.000123",
      "status": "paid"
    }
  }
}

Events currently delivered: invoice.paid. Use the event id to ignore duplicates — the same event can arrive more than once.

Verify the signature

The header has a Unix timestamp t and an HMAC-SHA256 v1. Compute HMAC_SHA256(secret, t + "." + rawBody) as hex, compare it to v1 in constant time, and reject timestamps older than 5 minutes. Always use the raw request body, not re-serialized JSON.

import crypto from "node:crypto";

export function verify(secret, header, rawBody, toleranceSec = 300) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  const a = Buffer.from(expected, "hex");
  const b = Buffer.from(parts.v1 ?? "", "hex");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Retries

If your endpoint times out (10 seconds) or returns a non-2xx status, Xclusor retries with exponential backoff — 1, 2, 4, 8 minutes and so on, capped at 6 hours between attempts — for up to 15 attempts. More examples in Code examples.

Ready to accept crypto the right way?

Set up your first invoice today. Your keys, your coins, your customers.