WeChat Pay configuration
WeChat Pay configuration overview: Enable H5 payment and native payment (Steps 1–2) → Add an authorized payment directory and webpage authorization domain (Steps 3–4) → Obtain your AppID, AppSecret, merchant ID, and merchant API key (Steps 5–8) → Enter these credentials in your website's backend to enable WeChat Pay (Steps 9–10).
1. Log in to the WeChat Merchant Platform, click Product Center, and under My Products, apply for H5 payment and native payment.
2. Wait for WeChat to review your application. After approval, the status changes to "Enabled." On the left navigation pane, click Development Configuration. In the payment configuration section, click Add and follow the on-screen instructions to configure H5 payment and native payment.
3. In the payment configuration section, under Official Account Payment, add an authorized payment directory. The directory must be in the format: your-website-domain/WeixinApi/.
4. Log in to the WeChat Official Accounts Platform. Navigate to Settings and Development > Official Account Settings > Function Settings. In the webpage authorization domain field, enter your website's top-level domain.
5. In the WeChat Official Accounts Platform, click basic configuration to view and copy your AppID and AppSecret. Note: You can view the AppSecret without resetting it.
Note: If WeChat Pay is not yet enabled for your Official Account, log in to the WeChat Official Accounts Platform, go to the WeChat Pay section, click Enable in the upper-right corner, and follow the prompts until WeChat approves your application.
6. After WeChat Pay is enabled, click WeChat Pay and locate your merchant ID in the Merchant Information section.
7. In the Merchant Information section, under Transaction Data, click WeChat Merchant Platform. Log in with your merchant platform account and password.
Note: If you have not installed an operation certificate, you must first apply for and install one on the Operation Certificate page.
8. After you install the certificate, go to the API security page, click Set Key, and create a custom 32-character merchant API key.
9. Navigate to E-commerce Member > payment configuration.
10. In the payment configuration settings, find the WeChat Pay option and click Enable.
In the WeChat Pay configuration dialog box, enter your AppID, AppSecret, merchant ID, and merchant API key, and then click OK.