Overview
Mini program configuration determines how your mini program behaves and interacts with web services. Configuration is managed at two levels: global (for all versions) and release-specific (for a particular version, target app, and environment). Using configuration, you can set up secure connections, enable testing, and adjust behavior based on the deployment environment.
Configuration levels
Mini program configuration is managed at the following levels, allowing you to define general rules and make exceptions for specific deployments.
Global configuration
Global configuration is your mini program's default setup. It applies to all new versions and is also used when you preview your mini program in the IDE. Use global configuration for:
- Settings that are consistent across target apps or environments.
- Testing configurations during development in the IDE.
Release-specific configuration
Release-specific configuration applies only to a specific deployment, defined by the combination of mini program version, target app, and environment. Use this for settings that need to vary per version, app, or environment.
Note: If you define the same setting in both global and release-specific configuration, the release-specific value always takes precedence.
What you can configure
You can configure the following aspects of your mini program:
- Payment details or trusted identity: Set up credentials (for example, Merchant ID) for the following purposes:
- Process payments with an acquirer in your mini program.
- Establish a trusted identity for authentication within the super app.
- Network security allowlist: Define which server domains and mobile websites your mini program can access.
- Testers: Specify who can test your mini program before it goes live.
- Environment variables (for release-specific configuration only): Store sensitive information securely or provide dynamic configuration to your mini program so it adapts to different deployment environments (for example, sandbox or production).
How updates work
How and when your configuration updates take effect based on the level you edit.
For global configuration
- In the IDE: Previews immediately use the latest global configuration.
- In a target app: Updates apply based on the release status of your mini program version:
Current version status | How updates apply |
New Version Created | Apply to the current version |
Under Review | Depending on your choice:
|
Pilot Testing | Apply to future versions only |
Grayscale Release | |
Full Release |
For release-specific configuration
Updates apply immediately to the specific version, target app, and environment.
Related information
For more information, see the following topics:
- Edit global configuration: Set up configuration options that apply to every version and deployment of your mini program.
- Edit release-specific configuration: Customize configuration options for a particular version, target app, and environment combination.
- Use environment variables: Learn how to access environment variables from your mini program's source code.
- Configuration field reference: Find detailed explanations for each configuration field.