In the Merchant Center's "Settings - Configuration - Notifications" page, you can configure real-time alerts for new orders and daily reports.
Merchant Center Notification Configuration Page
Notification Methods
Notifications are used for merchants to receive real-time alerts for new orders and daily reports. The following notification methods are supported:
Email
DingTalk
WeCom
WebHook
Recommendation
Usually you only need to choose one commonly used notification method. WebHook notifications can customize more notification information.
WebHook Notifications
WebHook notifications can customize more notification information, suitable for scenarios requiring integration with your own systems.
Order Related Hooks
| Event | Hook Name |
|---|---|
| Order Created | order_create_hook |
| Order Paid | order_pay_hook |
| Order Cancelled | order_cancel_hook |
| Order Refunded | order_refund_hook |
| Order Out of Stock | order_out_of_stock_hook |
| Order Completed | order_finish_hook |
Inventory Related Hooks
| Event | Hook Name |
|---|---|
| Low Stock Alert | stock_alarm_hook |
| Low Key Stock Alert | key_stock_alarm_hook |
Statistics Related Hooks
| Event | Hook Name |
|---|---|
| Last 2 Days Order Count & Amount | order_count_amount_hook |
Signature Verification
WebHook secret key is used to sign and verify request content, ensuring requests have not been tampered with and come from a reliable source. Signature calculation steps:
- Concatenate current timestamp (milliseconds) +
\n+ secret key into a signature string, calculate signature using HmacSHA256 algorithm - Base64 encode the calculation result
- URL encode the Base64 result (using UTF-8 charset) to get the final signature
Request Headers
| Header | Description |
|---|---|
Content-Type | application/json |
User-Agent | apsdai-hook (identifies requests from APSDAI) |
X-Apsdai-Token | Password or calculated signature |
X-Apsdai-Timestamp | Timestamp when WebHook was triggered |
X-Apsdai-Event | Triggered hook type |
Test Feature
After configuration, you can click the "Test" button to verify if WebHook is configured correctly.