BxBytix

Webhooks

We POST JSON when an order or payout changes. Acknowledge with the exact body success.

Events

EventWhen
order.paidReceived amount covers the quote (within underpay tolerance)
order.paid_partialPartial funds
order.paid_overOver the quote plus overpay tolerance
order.expiredTimer elapsed while still open
order.cancelledPayer cancelled checkout
payout.submittedWithdrawal accepted and sent on-chain
payout.completedOn-chain payout confirmed
payout.failedPayout failed; available USD is credited back

Destination is callback_url on the order or payout, or the URL saved under Notifications. Headers: X-Bytix-Event, X-Bytix-Signature. Content type is application/json. We POST once per status change — not once per on-chain transfer.

Ack

http
HTTP/1.1 200 OK
Content-Type: text/plain

success

HTTP must be 2xx and the body must be exactly success (trimmed, case-insensitive). JSON such as { "ok": true } is a failure. We store the first 2,000 characters of the response as the error.

Signature

HMAC-SHA256 of the using your webhook secret. Compare the hex digest in constant time. Prefer the raw request bytes; re-serializing a parsed object can change key order and fail verification.

js
const crypto = require("node:crypto");

function verify(rawBody, signature, secret) {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(rawBody)
    .digest("hex");
  const a = Buffer.from(signature, "utf8");
  const b = Buffer.from(expected, "utf8");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Body

FieldWhen
eventAlways. order.paid | paid_partial | paid_over | expired | cancelled
event_typeAlways. Suffix after order.
cidAlways. Public payment id from create.
order_idAlways. Your order id.
payer_idIf sent on create.
order_amountAlways. Decimal string.
order_currencyAlways.
statusAlways. Current order status.
crypto_amountAfter a quote is locked.
asset_symbolAfter a quote is locked.
network_nameAfter a quote is locked.
payment_addressAfter a quote is locked.
txidWhen a transfer matched.
received_amountWhen a transfer matched.
payout_idPayout events. Your payout id from create.
idPayout events. Bytix payout id.
amountPayout events. USD decimal string.
assetPayout events. Ticker sent on-chain.
networkPayout events. Network display name.
addressPayout events. Destination address.

Retry

Failed rows appear under Settings → Notifications. Retry sends the same payload again with a fresh signature. Fix your ack first or the retry will fail too. We do not auto-replay on a schedule — use Retry in the portal after you fix the endpoint.