Skip to main content

How to use

Requirements

Webhook methods

WhiteBIT withdraw from main balance

Why Webhooks?

Webhooks deliver real-time HTTP notifications when events occur on a WhiteBIT account — deposits arriving, withdrawals completing, codes being applied, and refunds processing. Without webhooks, the only alternative is polling the deposit/withdrawal history endpoints repeatedly. Webhooks vs polling:
There is no webhook replay mechanism. If every delivery attempt fails, the event is dropped. Implement polling of the deposit / withdrawal history endpoint as a fallback so events can be reconciled after extended consumer downtime.
Common use cases:
  • Payment processing — Detect incoming deposits and credit end users automatically
  • Withdrawal monitoring — Track withdrawal lifecycle from creation to completion or cancellation
  • Code redemption — Receive notification when a WhiteBIT Code is applied
  • Refund handling — Detect successful or failed refunds for reconciliation
  • Virtual account monitoring — Receive bank details when a virtual account becomes active, without polling the status endpoint

How to use

A webhook is a separate entity with its own generated key and secret. It is not a property of a trading API key, and a trading API key never carries a webhook URL. An account has at most one webhook. The platform enforces this limit, so a second webhook cannot be created on the same account. A sub-account counts as a separate account, so the main account and each sub-account can have one webhook. Each deposit and withdrawal event goes to the webhook of the account that owns the transaction: the main account’s webhook does not receive sub-account events, and the payload carries no sub-account identifier. A sub-account webhook can be created only at whitebit.com, not through the API. To track sub-account deposits from an integration, poll the deposit/withdraw history of each sub-account with the sub-account’s API key. Event types are selected on the webhook itself, so a single URL receives every event type subscribed on it.
  1. Log in to whitebit.com.
  2. Open the API keys tab.
  3. Select the web-hook configuration tab.
  4. Paste the correct URI for the web server to process web-hook calls.
  5. Press Generate a new key button and toggle the activation switcher to “Activated”.
To create a sub-account webhook, log in to the main account at whitebit.com, switch the session to the sub-account, and then follow steps 2 to 5.
The secret key is shown only once. Save it in a secure key store.

Requirements

For web hook keys generation

Before using webhooks, verify ownership of the domain set as the webhook destination. Use one of three methods:
  1. Add a TXT DNS record to the domain with the webhook public key.
  2. Add the plain text file whiteBIT-verification.txt to the root domain folder and provide public web access. Place the public webhook key in the file.
  3. Implement the /whiteBIT-verification endpoint to respond with 200 OK and return a JSON array of public webhook keys. Example: ["<public-webhook-key>"]
Passing one of these checks enables the webhook. Verification runs per webhook key. The /whiteBIT-verification endpoint can return the public keys of several webhooks, such as the main account’s and each sub-account’s, so every key verifies against the same domain without a new DNS record.

For processing web-hook requests

All web hook requests are performing using POST method and with application/json content type. Consumer server should respond with 200 HTTP status code. If the consumer cannot handle the webhook, the platform retries delivery a small number of times spaced roughly an hour apart, over a window of about one day. Treat the exact cadence as best-effort, not a contract, and pair webhook consumption with periodic history polling for reconciliation.

Body data

All web-hook requests are performing with
method - string. The name of method which was evaluated. Webhook methods include the following: id - string. Uuid to identify every request. params - the request payload. Contains data about the actions triggering the webhook call. The field also contains a nonce. ‘nonce’ - a number always greater than the previous request’s nonce number

Request headers

Also, all request contains additional data in headers:
  1. 'Content-type': 'application/json'
  2. 'X-TXC-APIKEY': api_key - the WhiteBIT webhook API key
  3. 'X-TXC-PAYLOAD': payload' - where payload is base64-encoded body data
  4. 'X-TXC-SIGNATURE': signature - where signature is hex(HMAC_SHA512(payload), key=api_secret)). api_secret is the secret of the generated webhook key.
On the consumer side, process the security headers to verify the request originated from WhiteBIT.

Source IP range

WhiteBIT delivers webhooks from a fixed IP range. The account manager provides the range for allowlisting; the portal does not publish it. Verify the origin of each request with the request headers.

WebHook Methods

WhiteBIT code apply

Performed when code was applied. Request example:

WhiteBIT deposit to main balance

Performed when a deposit is accepted. Every fiat deposit sends deposit.accepted; a crypto deposit does not always send deposit.accepted, so do not wait for the event before handling deposit.updated or deposit.processed. Request example:
Performed when a crypto deposit changes (fiat deposits do not send deposit.updated): a new confirmation count, a deposit recorded as uncredited (status 22), or an early credit (status 29) where the network’s confirmations_for_trading is lower than confirmations. Request example:
Performed when the deposit is processed and available on the balance (status 3 or 7). For a crypto deposit this happens when the network fully confirms it; any hold from an early credit (status 29) clears. Request example:
Performed when a deposit is canceled with status 4. A deposit canceled with status 9 sends no webhook; the deposit appears only in the deposit/withdraw history. Request example:

Travel Rule deposit statuses (EEA)

For EEA users, an inbound deposit may be frozen pending Travel Rule verification, and the deposit carries a Travel Rule status code (see Deposit and withdrawal status codes). There is currently no webhook for these transitions, so track status changes via the deposit/withdraw history. When the Travel Rule API is enabled for the account, submit the deposit originator data via Submit deposit originator data (POST /api/v4/travel-rule/deposit/verification); otherwise the deposit is verified manually at whitebit.com. Funds are credited only after successful verification. For details on Travel Rule requirements and the travelRule object for withdrawals, see Regulatory Compliance.

Deposit and withdrawal status codes

Status codes that the deposit/withdraw history returns include the following. Deposit status codes: Withdrawal status codes:

WhiteBIT virtual account status

Performed when the status of a virtual account changes. The deposit.virtual_account_status event removes the need to poll Get virtual account status for status changes; polling remains available. The event covers virtual accounts of every provider, including accounts registered through the WhiteBIT interface. To receive the event, enable the virtual account status event in the deposit group of the webhook configuration. On a webhook created before the event was introduced, the event is disabled by default and existing event subscriptions do not change. A webhook activated for the first time subscribes to every event, including deposit.virtual_account_status. The platform sends the event on every status change of the virtual account:
  • Activation — the provider allocates the account, and status becomes active.
  • Rejection — the provider refuses to open the account, and status becomes rejected.
  • Closure — the provider closes the account, and status becomes closed. A closure attempt that leaves the account open does not trigger the event.
Registration does not trigger the event: the initial pending status that Create virtual account returns is not a status change. Deposits to the virtual account do not trigger the event either; deposit status changes arrive as the deposit.* events above. The platform sends the event only after Get virtual account status returns the new status, so both sources report the same status for the same account. Request example:
The event carries the bank details that end users send deposits to. Verify the X-TXC-SIGNATURE header as described in Request headers before using paymentDetails.
Delivery follows the retry policy in Processing webhook requests. A failed delivery does not change the virtual account status. After the last retry fails, the platform drops the notification; use Get virtual account status to read the current status and bank details.

WhiteBIT withdraw from main balance

Performed when withdraw was created (status 5). A sub-account withdrawal that waits for main-account confirmation sends no webhook while it waits; after the main account confirms it, withdraw.unconfirmed is sent to the webhook of the sub-account that owns the withdrawal. Request example:
Performed when withdraw is pending. Request example:
Performed when a withdrawal is canceled, including a withdrawal that fails processing after a retry when two withdrawals compete for the same balance. Request example:
Performed when withdraw was completed. Request example:

WhiteBIT refund successful

Triggered after the system successfully completes a refund. In this webhook, refundAmount is the amount sent on-chain and refundNetworkFee is the network fee. Refund history returns neither value: its refundAmount is the deposit amount. memo is the destination memo sent in the refund request. Unlike deposit and withdraw webhooks, which send "", refund webhooks send null when no memo was provided. Request example:

WhiteBIT refund failed

Triggered when a refund fails: the review rejects the refund, or a refund attempt fails. After a rejection, Get refund history shows the refund as canceled, which is final, and no funds are sent. Request example:
When a refund attempt fails for an internal reason, Get refund history still shows the refund as in_process and the refund is not final. A refund with status canceled in the refund history is final.

What’s Next

Payment Integration

End-to-end guide for deposit and withdrawal processing with webhook reconciliation.

Security Best Practices

HMAC-SHA512 signature verification, API key management, and production hardening.