Callback Request
- The callback request from the platform uses the same signature method and data structure as the API requests initiated by the merchant.
- If you need to authenticate and verify the callback signature, you can generate the callback API key/Secret in the merchant dashboard.
- Use the
webhookType
parameter in the callback to determine whether it is a withdrawal or deposit callback. The content of the callback varies depending on the type. - For both receiving and sending payments, an order typically triggers two callbacks. Determine the type based on the
status
parameter in the callback:- When
status
isAwaitingConfirmation
, it is the first callback. - When
status
isSuccess
orFailed
, it is the second callback.
- When
If your business does not need to display the
AwaitingConfirmation
status of an order, you can ignore the first callback, as it represents a transitional state of the order.Callback Response
For callbacks, you need to respond with an HTTP status code200
without a response body. If the server is temporarily unavailable or the response status is not 200
, the platform will retry the callback multiple times with increasing delay intervals. The number of retries is limited. If retries are exhausted and the callback fails, you can manually resend the callback from the “Transaction Callback” section in the merchant dashboard.
You can use tools like requestcatcher.com to conveniently test your callbacks.