Confirm the request reaches you
Log the request at the very first line of the handler: headers, raw body, source IP. No log entry means the request never arrived, so the problem is the address, DNS, certificate or firewall.
notify_url must be publicly reachable over HTTPS with no query string, no internal address, and no dependency on a login session.
A wrong response counts as failure
APIv3 callbacks require HTTP 200 with the specified response body. Returning 200 with the wrong body, or a 302 redirect, is treated as failure and retried.
Persist first, respond second. Long-running work inside the handler causes timeouts, which produce duplicate notifications.
Verification and idempotency
Verify with the platform certificate or WeChat Pay public key, and update it when keys rotate. Otherwise verification works for months and then fails all at once.
Retries mean the same order can notify multiple times. Business logic must be idempotent on the merchant order number so a repeat does not ship twice or credit twice.
FAQ
Can notify_url use HTTP?
No. It must be HTTPS with a valid certificate. Self-signed certificates fail verification.
Do callback failures block customer payments?
No, but order state stops updating and WeChat keeps retrying. Prolonged failures can affect merchant risk scoring.
How do I reconcile missing callbacks?
Query the order status by merchant order number and process it if paid. Never rely on callbacks alone.
Related questions
Further reading
- WeChat Pay Merchant Setup Service details
- Debugging WeChat Pay Callbacks: Did the Request Arrive
- What Are the Common API Configuration Errors in Official Account Development? A Checklist Approach
- What to Do When Alipay Merchant Setup Documents Are Rejected? Correction Tips and Document Checklist
- Why WeChat Pay Settlements Get Delayed: Checking Order, Records and Bank Side
Sources & References
The following are public sources. Always check the latest requirements on the official authority or platform page.
