English
Gateway Collection Go-Live
This is the fifth stage of the Complete Go-Live Guide, and the one only gateway collection scenarios need: it lets payers pay directly on the platform-hosted cashier page / QR code instead of a page of the merchant's own.
The five stages (H5 gateway deployment → domain verification → gateway payment routing → QR codes → cashier mini-program publication) are configured on different pages; this page strings them together in go-live order. Each stage ends with a link to its detailed document.
Choose the Collection Form First
| Form | Payer experience | Which stages are needed | Fits |
|---|---|---|---|
| Direct API | The merchant's own page / system completes the payment | None (skip this page) | Business systems with development capability; see Business System Integration |
| Unified cashier | Opens the platform-hosted cashier page and picks a pay method | Stages 1–3 (+5 for collection inside a mini program) | PC / H5 shops, bill collection |
| Aggregate scan | A printed static code that each wallet recognizes on scan | Stages 1–3 + 4 (+5) | Offline table cards / stickers / standees |
| QR code | The physical carrier of aggregate scan | Same as above (a QR code is an aggregate-scan entry) | Offline stores |
Prerequisites
This page assumes Payment Capability Provisioning is done (production channel merchant + keys + routing). Gateway payment routing resolution depends on app routing — without it, the gateway page opens but payment still fails.
Stage 1: Deploy the H5 Payment Gateway
The payment gateway (H5) is an independent frontend project that serves the payer-facing pages: cashier, aggregate scan, and the auth relay. Deployment follows your main deployment path:
| Deployment path | H5 gateway | What you do |
|---|---|---|
| One-click deployment | Built into the H5 image (including nginx reverse proxy and verification-file forwarding) | Just fill in the H5 domain when binding domains in the panel; existing deployments must rebuild the H5 container after upgrading the panel |
| Source static deployment | An independently built static artifact | Host it yourself in nginx: static hosting + /api/ reverse proxy + SPA fallback (try_files ... /index.html) + HTTPS. For an example see Project Build - Static Deployment |
The domain contract (the core of this stage): payment links, pay-result redirects, and auth callback addresses are all generated by the backend from the "payment gateway frontend URL" in the endpoint configuration — the frontend does not assemble them. Therefore:
- The H5 deployment domain must be strictly identical to the "payment gateway frontend URL" in Endpoint Configuration;
- The cost of a mismatch: 404 on the post-payment redirect, failed WeChat / Alipay authorization callbacks, and lost third-party login redirects (for the address list see Payment Gateway: Deployment and Go-Live).
Stage 2: Domain Verification
WeChat / Alipay only allow use inside their ecosystems (JSAPI payment directories, mini-program business domains, QR code rules) after the domain ownership is verified. Two scenarios, two entries, and the gateway-side reverse proxy is already reserved in Infrastructure:
| Scenario | Upload entry | When it triggers |
|---|---|---|
Platform level (random-name .txt / .html) | Admin panel → Payment Management → Access Configuration → Domain Verification Files | Issued by the platform when configuring "plain-link QR code rules" in stage 5; the same applies to Alipay "linked plain QR codes" |
Merchant level (MP_verify_*.txt) | Merchant panel / Merchant Workbench → Business Configuration → Domain Verification Files | The merchant's own official-account web authorization and mini-program business domain verification |

Figure: The operations-side "Domain Verification Files" page — the upload entry for platform-level verification files
For the mechanism see Channel Integration - Domain Verification Files.
Stage 3: Gateway Payment Routing and Cashier Config
Gateway payment config is app-level (one set per app). Entry: merchant panel → Merchant Center → Payment Configuration → App Management → App Workbench → Gateway Payment Routing (the operations side has the same position in the merchant workbench).
The configuration has two layers with different responsibilities (the model is detailed in Gateway Payment Routing and App Payment Config):
- Gateway payment routing (routing layer — decides "can it pay"): the configuration dimension is a matrix of "opening environment (WeChat / Alipay / UnionPay / Douyin) × form (H5 / mini program)", with three depths: follow channel routing (auto, the recommended start) → by pay method (method) → specify directly (direct). For production, start from auto and check cell by cell with the routing hit preview for the hit channel merchant and gaps; jump to "Channel Routing" to fill any gap;
- Cashier config (presentation layer — decides "what it looks like"): bucket by terminal (five H5 buckets / Web / four mini-program buckets) to configure payment item display, recommendation, and order. It is independent of routing, and configuring it later does not affect payment.

Figure: Gateway payment routing — a matrix of "client environment × form factor"; the current effective mode is "direct" (channel merchants redacted)

Figure: Cashier config — under the H5 bucket, payment item lists are maintained per client environment (browser / WeChat / Alipay / UnionPay / Douyin)
Verify once with the debugging tool
In "Development & Debug → Payment Debug (Gateway)" pick a gateway payment type and submit a pre-order; the response returns the gateway landing page URL. Scan or open it to verify cashier rendering and routing without a real QR code. See Gateway Payment Debugging.
Stage 4: QR Code Production and Claiming
QR codes are the physical material for aggregate scan, produced under a "platform produces, merchant claims" model split across two sides (operation details in QR Codes and Terminals):
Go-live points:
- Choose the program type (H5 / mini program) when creating in bulk; mini-program plates depend on stage 5, so distribute H5 plates until the mini program is published;
- After claiming, confirm a plate's app and store ownership: the post-scan routing follows "the gateway payment config of the plate's resolved app" (explicit binding → store default app → merchant default app); if none of the three yields an available app, the QR code cannot be paid;
- The amount type is one of two: random amount (the user enters it; suits table cards) or fixed amount (for priced goods);
- "Enable / disable" controls the distribution state; before distributing, scan the real code from "View QR code" and walk the whole chain.

Figure: The QR code management list — batch generation / batch operations / export entries, with batch, amount type, enablement state and merchant ownership at a glance
Scanned devices (cashier plugins, scan boxes) instead go through "merchant terminal ↔ channel terminal" binding — see QR Codes and Terminals - Merchant Terminals and Channel Terminals.
Stage 5: Publish the Cashier Mini Program
The cashier mini program lets WeChat / Alipay / Douyin pull up a mini-program cashier page from a plain QR code (a better experience than H5). Register and publish separately per platform; the checklist and detailed steps are in Cashier Mini Program: Publish and Go Live:
- Registration and AppId: register a mini-program entity on each platform and configure the AppId in the project's platform parameters (independent per platform);
- Domain verification: the mini-program console issues a verification file → upload it through the platform-level entry (stage 2);
- Plain-link QR code rules (key): make already-printed plain QR codes hit the rules and pull up the mini program. Three prefixes map to three collection entries:
https://domain/m/*(QR codes),/cm/*(unified cashier), and/am/*(aggregate pay); the platform issues a random verification file again at configuration time, uploaded through the same platform-level entry; - request legal domains: add the payment gateway domain to the mini program console's request legal domains — without it every request fails in production (the developer tool's "skip domain check" only works while debugging);
- Compile, upload, submit for review, publish: collection mini programs must fill in category qualifications truthfully; after publishing, verify the three chains with a real code.
Fallback when rules are missing
When a rule is not configured or does not match, scanning opens an H5 guide page (telling the user to scan with a wallet instead) and the mini program is not pulled up. This is designed fallback behavior, not a fault; always verify the whole chain with a real code after go-live.
Channel-side prerequisites for the cashier mini program
The cashier mini program uses one set of credentials across all platforms, and its openId must come from the same source as the collecting app. The platform mini-program AppId must be bound or reported on the channel side in use (ISV mode usually means the ISV mini program plus sub-merchant reporting). It does not work out of the box on every channel — confirm with the channel before integrating (see Payment Apps).
End-to-End Acceptance
Once all five stages are done, verify every chain with a real QR code (no developer tool, no simulation):
| Acceptance entry | Action | Expected |
|---|---|---|
QR code /m/* | Scan with WeChat, Alipay (+ UnionPay / Douyin as needed) | The matching cashier page opens → small payment → order successful |
Unified cashier /cm/* | Generate a link via pre-order, scan or open it in a browser | The cashier page shows the configured pay methods → payment succeeds |
Aggregate page /am/* | Scan to open the aggregate page | The environment is recognized automatically → payment succeeds |
| Callbacks and orders | Check after each verification | Pay trade status successful; merchant callback push records normal (when a notifyUrl is set) |
Quick Troubleshooting
| Symptom | Stage | Handling |
|---|---|---|
| Payment link / redirect 404 | Stage 1 | The H5 deployment domain does not match endpoint configuration; or the SPA fallback is missing |
| WeChat says the domain is not verified | Stage 2 | The verification file was not uploaded, or uploaded to the wrong owner (do not mix the platform-level and merchant-level entries) |
| The cashier page opens but payment fails | Stage 3 | The gateway payment config has gaps — check the routing hit preview; or channel routing was not "set as currently effective" |
| Scanning the plate does nothing / cannot pay | Stage 4 | The plate is not bound to an app or not enabled; or the bound app's gateway payment config is not ready |
| A scan opens the H5 guide page instead of the mini program | Stage 5 | No QR code rule matched: check the prefix spelling, domain consistency, and whether the mini program is published |
| Every request inside the mini program fails | Stage 5 | The request legal domains are not configured |
For more deployment-layer issues see Payment Gateway: Deployment and Go-Live - Common Deployment Problems and Cashier Mini Program - Fallback Behavior and Troubleshooting.
Next stage: Optional Feature Go-Live, or straight to Go-Live Acceptance and Handover.