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 Data Example#
{
"eventId": "event_9853dccb85b1",
"eventType": "credit_card.order.paid",
"data": {
"id": 0,
"trxNo": "txNo_db8b4f203301"
}
"userId": 1
}
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());Webhook Event Type#
| Event Type | Description |
|---|
credit_card.order.paid | A card payment order has been successfully paid |
credit_card.order.failed | A card payment order has failed |
credit_card.order.cancelled | A card payment order has been cancelled |
credit_card.order.expired | A card payment order has expired |
credit_card.subscription.expired | A subscription has expired |
credit_card.subscription.payment.succeeded | A subscription billing cycle payment succeeded |
credit_card.subscription.payment.failed | A subscription billing cycle payment failed |
crypto.order.paid | A crypto payment order has been fully paid |
crypto.refund.completed | A crypto refund has been completed |
crypto.refund.failed | A crypto refund has failed |
crypto.settlement.completed | A crypto settlement has been completed |
Modified at 2026-06-03 09:02:55