A callback is a notification request actively sent by the platform to the merchant regarding withdrawals or deposits. Upon receiving the notification, the merchant processes the appropriate business logic. Merchants should fully understand the callback rules and handle the callback data correctly. To learn more about the detailed callback mechanism, click here.
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 is AwaitingConfirmation, it is the first callback.
- When
status is Success or Failed, it is the second callback.
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 code 200 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.