Cashier Mini-Program: Publish & Go Live
The cashier mini-program is published per platform (one mini-program each for WeChat / Alipay / Douyin). Two things matter most: domain verification (proving the domain is yours) and plain-link QR code rules (letting existing QR codes open the mini-program). For compiling and uploading see Cross-Platform Apps.
Go-Live Checklist
- Register the mini-program on each platform and obtain the AppId;
- Complete domain verification (verification file upload);
- Configure the plain-link QR code rules;
- Configure the request allowed domains;
- Build, upload, submit for review, and release.
Step 1: Registration and AppId
Register a mini-program on each of the WeChat / Alipay / Douyin open platforms, obtain each AppId, and fill them into the project's platform parameters (the three platforms have independent AppIds). One platform, one mini-program — they do not affect each other.
Step 2: Domain Verification
WeChat requires every domain a mini-program calls to pass ownership verification:
- The WeChat platform issues a verification file (
MP_verify_xxx.txt); - Upload and host the file content in the admin console under "Payment Config → Domain Verification Files" (merchants can also self-service upload it in the merchant console, see Merchant Center);
- When you configure the business domain on the WeChat platform, WeChat fetches the file to complete the verification.
Details in Channel Integration - Domain Verification Files.
Step 3: Plain-Link QR Code Rules (Key Point)
The merchant's payment QR codes are plain-link QR codes already printed (their content is a URL like https://domain/m/xxx). These rules exist so that on scanning, WeChat / Alipay sees the URL matches a rule and opens the corresponding mini-program page directly — no dedicated mini-program code is needed.
Configure them under "Plain-link QR code jumps to mini program" on the WeChat platform:
| Rule prefix | Page opened |
|---|---|
https://domain/m/* | QR terminal payment page |
https://domain/cm/* | Unified cashier page |
https://domain/am/* | Aggregate pay page |
- Configure the three rules separately with the prefixes above (domain = the deployed domain of the Payment Gateway (H5));
- During configuration the platform issues a random verification file; upload and host it in the admin console as in step 2;
- For Alipay, configure the equivalent under "Scan QR code to enter mini program" on its open platform.
Consequences of missing rules
When a rule is missing or does not match, scanning opens the H5 guide page (prompting the user to scan with a wallet) and the mini-program is not opened — after going live, always verify the full chain with a real printed QR code.
Step 4: Allowed Domains
In the mini-program console, add the backend API domain (the payment gateway domain) to the request allowed domains; otherwise all requests fail in production (checking "do not verify domains" in DevTools only works while debugging).
Step 5: Build, Upload, and Review
- Build the platform target and upload it (operations in Cross-Platform Apps);
- Submit for platform review: collection mini-programs must truthfully declare their category and qualifications;
- Release after approval. Then use real QR codes to verify that all three chains (QR terminal / cashier / aggregate) open the mini-program and complete payment.
Fallback Behavior and Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Scanning opens the H5 guide page | QR code rule not matched: check the prefix spelling, domain consistency, and whether the mini-program is released |
| Wallet prompts "collection mini-program unavailable" | Same as above (the wallet environment hit the H5 fallback page) |
| Requests fail in production | Request allowed domains not configured |
| Domain verification fails | Verification file not uploaded, or uploaded to the wrong owner (platform / merchant level) |
Related Links
- Usage & Payment Flow: pages and flows in detail
- Cross-Platform Apps: build and upload operations
- Go-Live Guide: the overall go-live path