Two domains, two jobs
The web authorisation domain controls whether you can redirect to the authorisation page and receive a code. The JS safe domain controls whether wx APIs can be called on the page. A full H5 inside an Official Account usually needs both.
Enter the bare domain without scheme or path. Configuring www while users visit without www counts as a mismatch.
Verification files must sit in the right place
The platform asks for a verification file at the domain root, reachable over HTTPS. Frequent failures are rewrite rules blocking it, a 404 page with HTML instead of plain text, or a CDN caching old content.
Open the verification file URL in a browser first and confirm the content, then click verify on the platform.
When settings look right but still fail
Caching: the WeChat client caches pages, so clear cache or test with another account. Callback URLs with extra parameters or a port do not match the configuration. Or scope is snsapi_userinfo and the user cancels, with no fallback in code.
We help with configuration and the callback chain, including signature algorithms, access_token management and error handling. Entity qualification and interface permissions are decided by the platform.
FAQ
Can the authorisation domain differ from the JS domain?
It can, but keeping them identical reduces troubleshooting complexity. If they differ, ensure both verification files are deployed and reachable.
Can an unfiled domain be configured?
It is typically required to be filed. Even if configuration passes, access may be restricted, so complete filing first.
What causes a redirect_uri parameter error?
Usually the callback URL does not match the configured domain, or it is not URL-encoded. Check scheme, domain and path for an exact match, and confirm encoding.
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.
