Configuration field reference
This topic explains the usage and entry tips for each configuration field of mini programs. Proper configuration ensures that your mini program functions correctly and meets business and security requirements.
Note: This topic is intended for merchants. If you are the super app, refer to Configuration field reference (for super apps).
Overview
The table below provides a glance at the configuration fields, their purpose, and the configuration levels (global or release-specific) in which they are available. Use it to quickly identify the fields you need to configure, then proceed to the detailed sections for specific instructions:
Configuration field | Purpose | Configuration level |
| Both global and release-specific | |
Network security allowlist | Both global and release-specific | |
Internal testing | Both global and release-specific | |
| Release-specific only |
Note: Ensure your entries are correct and specific for each configuration level:
- Global configuration applies to all new mini program versions and IDE previews.
- Release-specific configuration applies to a particular version, target app, and environment combination.
Field details
See the field details in the following sections:
Client ID and Merchant ID
Use these fields to establish your identity for payment processing with your acquirer or for authentication within the super app.
- Definitions:
- Client ID: A unique ID assigned by your acquirer to identify a specific payment scenario of the merchant.
- Merchant ID: A unique ID assigned by your acquirer or the super app to identify your merchant identity.
- When to configure: Configure these IDs if all the following conditions are met:
- Your mini program needs to process payments or establish a trusted identity for authentication within the super app.
- The super app requires you to provide them for your target app.
- (Client ID only) Your mini program uses the my.tradePay JSAPI to initiate payments.
- Where to configure: Both global and release-specific configuration.
- How to configure:
- Global configuration: Set IDs for each supported environment if the target app works across multiple environments. For each environment, use either an environment-specific or universal ID as instructed by the super app or your acquirer.
- Release-specific configuration: Set the ID for the target environment of the specific release. Use either an environment-specific or universal ID as instructed by the super app or your acquirer.
Server Domains and WAP URLs
Use these fields to define a secure allowlist of web resources, ensuring your mini program only interacts with trusted endpoints.
- Definitions:
- Server Domains: Allowed server domains (excluding super app domains) that your mini program can communicate with in certain JSAPI requests. For example:
- WAP URLs: Allowed mobile page URLs (excluding super app domains) that can be loaded within the
web-viewcomponent of your mini program.
- When to configure: Configure these fields in line with your business workflow and security requirements.
- Where to configure: Both global and release-specific configuration.
- How to configure:
- Enter each domain or URL in a separate row in the provided input boxes.
- All entries must use the HTTPS protocol.
- If your mini program needs to access all domains and URLs, contact the super app for permission to use the wildcard
.*to allow. Be aware that wildcard use might pose security risks.
Testers
Use this field to manage a list of users who can access your mini program for testing before it goes live.
- Definition: A list of super app user IDs representing testers who can access your mini program before it goes live.
- When to configure: Set testers when you plan to test a new mini program release.
- Where to configure: Both global and release-specific configuration.
- How to configure: Select either of the following options to add testers:
- Add by Manual Entry: Enter the super app user IDs directly into the input box. Enter one ID per row, with a maximum of 150 testers. Note that long user IDs might reduce the allowed count. If you encounter issues saving the list, try reducing the number of testers.
- Add by File Upload: Upload a CSV or TXT file containing the super app user IDs. Use the template provided on the interface and ensure the file does not exceed 100 KB. For optimal performance, it is recommended to limit the number of testers to 1,000 or fewer.
Environment Variables
Note: This feature is only available for DSL mini programs and must be enabled by the super app.
Use this field to pass environment-specific configuration values and sensitive information securely.
- Definition: A set of custom key-value pairs where the value is specific to a certain deployment environment.
- When to configure: Set environment variables for the following cases:
- You need different settings (such as API endpoints) for different release environments.
- You need secure storage for sensitive information.
- Where to configure: Release-specific configuration only.
- How to configure:
- Add the variable names and their corresponding values. You can specify up to 5 environment variables per release.
- Default values: When you create a new release for the same target app and environment, the environment variables from your previous Full Release version are automatically pre-filled. You can review and modify these values for the new release.