WeChat Payment Application & API Key Setup Guide
To enable the WeChat Pay feature of the WordPress "Logic Digital Technology" plugin "Website Management All-In-One", you need to correctly input the four pieces of WeChat Pay API information—"Application ID (AppId), Developer Secret (AppSecret), Merchant ID, and Payment Key"—under the "WeChat Pay Settings" section of the main settings in the Website Management All-In-One plugin. To obtain these four WeChat Pay API credentials, you must first create a WeChat Pay Merchant ID and activate the services for "JSAPI Payment" and "Native Payment". You will also need to configure a series of parameters in the developer settings for the payment products, set up API security, and bind the Application ID. Only after these technical steps are completed can you obtain the full set of WeChat Pay credentials: "Application ID (AppId), Developer Secret (AppSecret), Merchant ID, and Payment Key". The following content will provide a step-by-step demonstration until the complete technical configuration of WeChat Pay is accomplished.
Ⅰ、Register a WeChat Pay merchant account
Log in to the homepage of WeChat Pay. As shown in the figure below, under the WeChat Pay scan login box, there is an entry to apply for a WeChat Pay Merchant ID. Click "Become a Merchant" to go to the Register WeChat Pay Merchant ID page. Perform scan code registration and follow the WeChat Pay guidelines step by step to fill in and verify the information. Once the verification is approved, you can use the WeChat Pay Merchant ID or log in to the WeChat Pay merchant platform by scanning with a bound WeChat account.
The WeChat payment homepage is shown below:

The page for registering a WeChat Pay merchant account is shown below:

Ⅱ、Activate "JSAPI Payment" and "Native Payment" for the Merchant Account
After logging into the WeChat Pay merchant platform, click on the "Product Center" button in the top right corner (highlighted in the red box). On the page that follows, locate the payment product categories at the bottom. In the highlighted section, activate "JSAPI Payment" and "Native Payment" by clicking on the product you want to enable, and then click the "Apply for Activation" button on the product details page.

Ⅲ、Developer Configuration for "JSAPI Payment" and "Native Payment"
Before integrating the interfaces of "JSAPI Payment" and "Native Payment" into the website, you must correctly configure the related parameters in the developer configuration. Otherwise, errors will occur when integrating into the WordPress website and initiating payments. The developer configuration for "JSAPI Payment" and "Native Payment" is on the same page, meaning a single developer configuration page includes parameter settings for multiple payment products. When you enter the developer configuration from the "JSAPI Payment" product page and save the configured parameters, you do not need to configure again in the "Native" product page. This is because all payment product pages direct to the same developer configuration page. Entering from any product page yields the same result. The correct configuration methods for "JSAPI Payment" and "Native Payment" are shown below

1. Description of JSAPI payment and Native payment development configuration items
- JSAPI Payment Authorization Directory: Enter the domain name of the website where JSAPI payment will be integrated (the domain name of the website where you will use WeChat Pay).
- Native Payment Callback URL: After the user authorizes the payment via WeChat, the WeChat server will redirect the user's browser to the callback URL specified by the developer (the domain name where you are using WeChat Pay).
At this point, the development configuration for WeChat Pay's JSAPI and Native payments has been completed. The next step is to obtain the AppID (Application ID) and AppSecret (Developer Secret) from the WeChat public platform.
Ⅳ、Get the application ID (AppId) and developer key (AppSecret) from the official account
To integrate WeChat Pay into a website, you need to use the WeChat Application ID (AppID) parameter. The WeChat Pay merchant platform does not directly allow the creation of WeChat ecosystem applications. Applications must be created on the WeChat Official Platform. If you have not created an account on the WeChat Official Platform, you must do so first. There are two types of WeChat applications: Official Accounts and Mini Programs. Both types can be created on the WeChat Official Platform. Creating either application and binding its Application ID (AppID) with the WeChat Pay merchant platform is sufficient. Below, we demonstrate using an Official Account to obtain the Application ID.
After creating a WeChat public platform account, log in to the backend of the public account, expand the "Settings and Development" on the left sidebar marked with a red box as shown in the figure below, and there is an entry for the "Basic Configuration" of the public account. After clicking Basic Configuration, the interface is as shown below:

1、Obtain the AppID from the WeChat Official Account's "Basic Configuration"
The first item marked in the red box on the right of the image is the AppID, also known as the Developer ID (AppID). Copy and save the Developer ID (AppID).
2、Obtain the AppSecret (Developer Secret) from the WeChat Official Account
The second item marked in the red box on the right of the image is the Developer Secret (AppSecret). Click "Reset" to save the AppSecret.
3、Set up the IP Whitelist
Enter the server IP that will use WeChat Pay into the "IP Whitelist". When calling the access_token retrieval interface using the Developer ID and Secret, the source IP must be in the whitelist. Only IPs in the whitelist can successfully call the access_token retrieval interface.
Ⅴ、Function settings of the official account
After setting the "basic configuration" of the above official account, you also need to correctly configure the function settings of the official account. In the background of the official account, click "Official Account Settings-Function Settings" in sequence to enter the function settings page as shown in the figure below. The red box in the figure below is the setting item that the official account needs to be correctly configured.

WeChat Official Account Configuration Settings:
- Business Domain: Set this to the domain name of the website you want to use for WeChat Pay, including both versions with and without "www."
- JS Interface Security Domain: Similar to the business domain, set this to the domain name of the website you want to use for WeChat Pay, including both versions with and without "www."
- Web Authorization Domain: Again, set this to the domain name of the website you want to use for WeChat Pay, including both versions with and without "www."
Ⅵ、Bind AppID
Follow the steps shown in the image below. On the payment product page (the details page for JSAPI payment), click on "AppID Account Management," then click the "+ Associate AppID" button marked in the red box. This will take you to the interface where you can enter the AppID for binding.

Copy the AppID (Developer ID) obtained from the Basic Configuration of your WeChat Official Account and paste it into the AppID input box marked in the red box. Check the "I have read and agree" checkbox, then click the submit button. This will complete the binding setup for the WeChat Pay Merchant Platform.

Ⅶ、 "API Security" - Apply for a Certificate and Configure API Key
After binding the WeChat Pay Application ID (AppID), you must configure the settings under "API Security". As shown in the figure below, on the management page of the WeChat Pay merchant platform, click "Account Center" on the top menu, then "API Security" on the left sidebar to enter the API Security settings page. This is where you obtain the API certificate and configure the payment keys. The "APIv2 Key" and "APIv3 Key" that need to be set under API Security are the Payment Keys. After applying for the API certificate, set up the APIv2 and APIv3 keys. Make sure to store the keys securely after setting them.
The editor's WeChat Pay merchant platform account has already applied for the API certificate and set the APIv2/v3 keys (payment keys). Both the certificate and keys are currently in active use, so for security reasons, an actual operation demonstration is not provided here. You may refer to the API Certificate Application Guide, APIv2 Key Setup Guide, and APIv3 Key Setup Guide for proper configuration instructions.

Once the "API Security" certificate application and API key configuration are completed, the WeChat Pay setup is fully finished. The four pieces of WeChat Pay interface information required by the WordPress All-in-One Management Plugin—AppID, Developer Key (AppSecret), Merchant Number, and Payment Key—are now obtained and saved, with three out of four items completed. The only remaining item, the "Merchant Number," was not covered in the previous steps. Attentive readers may have already noticed that the Merchant Number is generated when you create a WeChat Pay merchant account. For those who have not yet found how to locate the Merchant Number, please refer to the following screenshot.
Ⅷ、 Obtain Merchant Number
As shown in the image below, click on "My Account" in the top-right corner of the WeChat Pay Merchant Platform, as highlighted in the red box. The first item in the expanded information is the Merchant Number. Copy this number and save it along with the other interface information.

Ⅸ、Enter WeChat Pay Information (AppID, AppSecret, Merchant Number, and Payment Key) into the Plugin Settings
After obtaining the AppID, Developer Key (AppSecret), Merchant Number, and Payment Key, enter them into the corresponding fields in the WeChat Pay Settings section of the WordPress All-in-One Management Plugin. After copying and pasting the information into the fields, click the "Save Changes" button at the bottom. This will enable the WeChat Pay functionality for product purchases, services, and paid memberships on the WordPress site. When users click on the purchase buttons for products or services on the frontend page, they will be able to complete the checkout using WeChat QR code payment.

Conclusion: By reading the content of “Application For WeChat Pay And Obtaining WeChat Pay API Keys,” readers have clearly understood the configuration methods of the two WeChat Pay products—JSAPI Pay and Native Pay—as well as the operational flow of how application services within the WeChat ecosystem are interconnected and verified. After mastering the technical principles of integrating WeChat Pay into websites, users can independently complete the integration of WeChat Pay using the WordPress All-In-One Website Management Plugin by Logic Digital Technology. Lastly, we would like to remind everyone that the obtained WeChat Pay API credentials must be securely and properly stored to prevent loss. Reconfiguring them may cause the existing keys to become invalid, rendering the previously configured WeChat Pay integration on the website unusable.
Logic Digital Technology (SZLOGIC) All rights reserved. Reproduction is prohibited.