Withdrawal Callback

When a merchant initiates a withdrawal, the order, if subject to approval, first enters the application’s approval process. After approval, the platform conducts a security check and initiates an on-chain transaction. Once the transaction is successfully included in a block, the platform sends the first callback notification to the merchant, with the order status as AwaitingConfirmation. When the transaction reaches the required number of block confirmations, a second callback notification is sent to the merchant, with the order status updated to Success, indicating order completion.
For withdrawals, in addition to platform callback notifications, you can also actively track order processing using the Withdrawal Query API.

Deposit Callback

When funds are deposited into a blockchain address generated for the merchant, the platform’s monitoring system sends a callback notification to the merchant as soon as the transaction is detected. At this point, the order status is AwaitingConfirmation. When the transaction reaches the required block confirmations, a second callback notification is sent to the merchant, with the order status updated to Success or Failed, completing the order.

FAQs

1、Why are there two callbacks for a transaction?

When a transaction is first included in a block, the platform immediately sends the first callback notification, allowing the merchant to quickly respond and perform relevant business processes. For instance, wallet providers can quickly credit the user’s account, but in a frozen state. However, due to the nature of blockchain networks, there is a slight chance of transaction rollback or invalidation due to network forks or reorganization. Hence, after a certain number of block confirmations, the platform sends a second callback notification. At this stage, the transaction is considered final and irreversible, allowing the frozen funds to be safely credited.
The two-callback mechanism ensures that transaction information is promptly relayed to the merchant, enhancing user experience while maintaining transaction security. If your business does not require displaying the AwaitingConfirmation status, you may ignore the first callback, as it represents an intermediate state of the order.

2、 What is block confirmation?

Block confirmation refers to the number of subsequent blocks generated after a transaction has been validated and recorded on the blockchain. Each new block further confirms all previous transactions. The higher the number of confirmations, the lower the risk of transaction alteration. For instance, on the Bitcoin network, it is generally recommended to wait for at least 6 confirmations to ensure transaction immutability. Different blockchain networks may have varying confirmation requirements depending on their security needs.

3、How should callbacks be handled?

The specific business logic for handling callbacks depends on your use case. For example: • When the first deposit callback is received, the order status is AwaitingConfirmation. You may credit the corresponding amount to the user’s account in a frozen state. • When the second deposit callback is received, the order status is either Success or Failed. If Success, unfreeze the funds and complete the crediting process. If Failed, unfreeze the funds and cancel the crediting process.

4、How to ensure callback security?

You can generate a callback-specific API Key/Secret in the merchant dashboard. The platform uses this API Key/Secret to sign callback requests. Upon receiving a callback, verify the signature to ensure its authenticity.

5、What happens if a callback fails?

You can manually resend the callback from the merchant dashboard under the “Callback Errors” section.

6、How to customize block confirmation requirements?

You can customize the number of block confirmations required for the first and second callbacks in the merchant dashboard. Merchants can specify the number of confirmations required for the first callback notification and how many are needed before the second callback notification is sent.
Unless you have specific requirements for block confirmations and a thorough understanding of the confirmation rules of different chains, it is recommended to use the platform’s default confirmation settings.