Precautions for callback notifications
Update Time:2025.12.041.Notes on Filling in notify_url
Merchants must fill in the notify_url with the address of their own system, not with the example address found in the port document or demo.
notify_url must be a complete full path address starting with either https:// or http://. Ensure that the domain name and IP address in the URL are accessible from the external network. Do not enter "localhost", "127.0.0.1", "192.168.x.x", or other local or internal IP addresses.
notify_url cannot contain parameters.
Examples of common errors:
Error description | Error example |
URL only contains the domain name, missing a specific path | http://www.weixin.qq.com |
URL does not start with "https://", missing a domain name or IP address | ./PayNotify.aspx |
URL contains a local or internal IP address | http://127.0.0.1/pay/notify.php |
The string is not in URL format | xxxxxxx, 1234567, test |
2.Notes on Callback Processing Logic
The code processing logic of notify_url cannot perform login status verification.
Merchants system must return a response message within 5 seconds after receiving the notification of payment results. Otherwise, WeChat Pay will process this as a failed notification attempt and will resend the notification.
The same notification may be sent multiple times to the merchants system. Therefore, the merchants system must be able to handle duplicate notifications correctly. If a notification has already been processed, WeChat Pay shall receive a successful notification callback.
Merchants who have firewall policy restrictions on WeChat Pay callback IP addresses are required to add the following IP segments to the whitelist:
101.226.103.0/25 |
140.207.54.0/25 |
121.51.58.128/25 |
183.3.234.0/25 |
58.251.80.0/25 |
121.51.30.128/25 |
162.62.214.129 |
43.130.234.138 |
43.131.228.178 |
43.133.14.225 |
43.133.202.169 |
43.153.241.56 |
43.153.244.194 |
43.153.244.52 |
43.155.125.174 |
43.155.169.179 |
43.155.179.63 |
43.157.108.179 |
43.157.90.235 |
43.159.160.121 |
43.159.160.129 |
43.159.160.232 |
43.163.128.121 |
43.163.128.16 |
43.154.94.175 |
43.132.183.192 |
101.32.203.103 |
43.137.145.80 |
124.222.226.60 |
43.141.7.182 |
To ensure security of the merchant systems, WeChat Pay may generate an incorrect signature for a very small number of responses or notification callbacks to detect whether the merchant system can correctly verify the signature.
There is no need for merchant systems to handle such traffic tests with any special care. These should just be treated as normal responses or notification callbacks. Merchant systems only need to verify their signatures. When troubleshooting, you can quickly identify a traffic test by checking for the WECHATPAY/SIGNTEST/ prefix in the signature value. All signature values generated for this purpose will contain this prefix. |
In the event of a failed signature verification, the merchant system shall return a failure response (e.g., an HTTP status code in the 4xx or 5xx range) and await the retransmission of the notification callback from WeChat Pay with a valid signature. |
3.Common Scenarios of Failed Callback Reception by Merchants
I. Callback URL Configuration Issues
Incorrect address configuration
The callback notification URL (notify_url) configured by the merchant on the WeChat Pay merchant platform or within the API parameters contains typographical errors, such as incorrect domain names or missing path segments;
The address does not use the publicly accessible HTTPS protocol, which is required by default for callback URLs in WeChat Pay;
Use of internal network addresses (e.g., 192.168.x.x, localhost) prevents WeChat Pay servers from accessing through internal networks.
Address lacks ICP filing / DNS resolution issues
The domain name associated with the callback URL has not completed ICP filing with the Ministry of Industry and Information Technology. This requirement is mandatory for domestic servers. While ICP filing is not required for overseas servers, it is essential to ensure that the domain name resolution functions properly;
The DNS resolution for the domain name failed due to issues such as expired resolution records or misconfigured A/AAAA records, preventing the WeChat Pay server from resolving the merchant server's IP address.
II. Network and Server Connectivity Issues
Merchant server firewall / security group blocking
The merchant server's firewall (e.g., Linux iptables, Windows Firewall) or the security group of the cloud service provider has not permitted incoming request for WeChat Pay callback notifications. It is necessary to add the WeChat Pay callback IP to the whitelist. The list of WeChat Pay callback IPs can be viewed at Notes on Callback Processing Logic;
The server has enabled security policies such as CC attack protection and WAF (Web Application Firewall), which mistakenly identified WeChat Pay callback requests as malicious and blocked them.
Network link failure
The network hosting the merchant's server experiences packet loss and high latency (e.g., exceeding 3 seconds), resulting in timeout of the notification request sent by WeChat Pay;
The CDN or reverse proxy (e.g., Nginx, Cloudflare) used by the merchant may be misconfigured, preventing the proper forwarding of the callback request to the backend business server.
III. Other Special Scenarios
If the merchant has not configured the apiv3key, WeChat Pay will not send a callback notification.
If the notify_url callback notification receiving address is not configured in the API, WeChat Pay will not send a callback notification.

