Overview#
AnexPay supports callback to customer interfaces in multiple business scenarios. Customers can implement their own business logic in the callback interface.
For webhook url configuration, please refer to API key management menu in Portal platform, and update the related API key info.
The callback is based on the HTTP/HTTP protocol with the POST method, and all request bodies are in JSON format with all characters encoded in UTF-8.
The callback process is considered Failed if any of the following situations occur: request failed, request timeout, or response status code other than 2XX.
The callback is divided into Synchronous and Asynchronous types, Synchronous request must respond in a timely manner and have no try mechanism, while asynchronous requests do not need to respond in a timely manner and have a retry maechanism.
Upon receiving the callback, kindly respond with SUCCESS; otherwise, a retry will be triggered.| Name | Response Time | Retry count | Retry Interval |
|---|
| OPENAPI_WEBHOOK | 15s | 14 | 15,15, 30, 180, 600, 1200, 1800,1800,3600,10800,10800,10800,21600,21600 |
Webhook Signature#
Webhook payload use signKey to format ANEX_PAY_SIGNATURE
in https request header, you need to encode the payload in the same way and compare with ANEX_PAY_SIGNATUREString signature = Base64.getEncoder().encodeToString(
Hashing.hmacSha512(signKey.getBytes())
.hashBytes(stringToSign.getBytes())
.asBytes());Verify Signature#
Webhook Event Type#
pay.order.paid#
pay.order.failed#
pay.order.cancelled#
pay.order.expired#
pay.subscription.expired#
pay.subscription.payment.succeeded#
pay.subscription.payment.failed#
crypto.order.paid#
crypto.order.failed#
crypto.order.expired#
crypto.refund.completed#
crypto.refund.failed#
crypto.settlement.completed#
Modified at 2026-07-07 09:18:45