What each item does
The merchant certificate proves requests come from you and its private key must stay on the server. The APIv3 key decrypts callbacks and sensitive fields. The platform certificate verifies WeChat Pay signatures and is normally fetched through an API and refreshed periodically.
Certificate expiry and wrong key are often confused. Error messages usually distinguish them: signature failures point to certificate or private key problems, decryption failures to a wrong APIv3 key.
A safe rotation order
Request and download the new certificate without deleting the old one. Deploy the new certificate and private key, pointing configuration at the new files. Restart the service and verify with a small real transaction. Only then revoke the old certificate on the platform side.
Reverse the order and you create a window where the new certificate is not yet live and the old one is already revoked. Every payment request fails during that window.
Two things easily missed
Environment parity: test, staging and production each need their own certificates. It is common for production to be updated while staging still uses the old one. Calendar reminders also matter: set one a month before expiry instead of discovering it through errors.
And never log private keys or secrets. Pasting a full request into a ticket or a group chat exposes your credentials.
FAQ
Do platform certificates need manual download?
They are normally fetched and refreshed automatically through the API. Ensure the service can pull them at startup, otherwise the first request after boot may fail.
Does rotation require downtime?
No, but sequence it properly: deploy and verify the new certificate, then revoke the old one. Do it off-peak with a rollback plan ready.
Does an expired certificate immediately break all payments?
Yes. Signature verification fails and requests are rejected. Rotate before the expiry date rather than on the last day.
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.
