Cashier Mini-Program: Usage & Payment Flow
The Cashier Mini-Program is the customer payment page: the customer scans the merchant's QR code to launch it, enters (or confirms) an amount, picks a pay method, completes the payment, and the mini-program closes itself. It is not a cashier-staff tool — merchant-side operations happen in the merchant panel / Merchant App. When the link opens in a browser (rather than inside WeChat / Alipay), the checkout page of the Payment Gateway (H5) takes over. For the publishing process see Publishing & Go-Live.
Three Ways In
These correspond to the three QR types of gateway payment (see Gateway Payment):
| QR type | Mini-program path | What the customer sees |
|---|---|---|
| QR terminal (static sign) | /m/{qr-terminal-code} | Amount entry page: shows the merchant name, enter an amount (fixed-amount QR terminals confirm directly), optionally add a remark, then pay |
| Aggregate scan | /am/{order-no} | Aggregate pay page: confirm the order amount, then pay |
| Unified cashier | /cm/{order-no} | Cashier page: shows order info; the customer picks a pay method (recommended item on top, may be locked) and pays |
The QR codes are "plain-link QR codes": the same code launches the WeChat mini-program when scanned inside WeChat and the Alipay mini-program when scanned inside Alipay, adapted automatically on the platform side. If the mini-program is not published or the QR rule does not match, the scan falls back to the guidance page of the Payment Gateway (H5), prompting the user to scan with a wallet instead.
Payment Flow (Page by Page)
QR Terminal Payment Page
- The customer scans; the mini-program parses the QR terminal code and loads its info: QR terminal name plus the subtitle "Pay {merchant short name}";
- Random-amount QR terminal: type the amount on the numeric keypad (up to two decimal places) and confirm to initiate; fixed-amount QR terminal: the amount is shown directly — tap the button to confirm;
- Optional remark (entered in a dialog, up to 50 characters), passed to the merchant with the order;
- If the chosen pay method needs the user identity (e.g. WeChat JSAPI), silent authorization fetches it automatically — the customer never notices;
- The platform payment component is launched to complete the payment; the result is shown in-page, and tapping "Done" exits the mini-program.
Unified Cashier Page
- Enter by scanning a
/cm/code or from an order link; the order loads: title, amount, order number; - Pay method list (icon + name + "Recommended" tag; when the method is locked, the other items are greyed out and unselectable); default selection order: locked item → recommended item → first item;
- Confirming payment launches the platform payment component, and the result is shown in-page. Which methods appear is decided by the merchant's cashier configuration (mini-program bucket).
Aggregate Pay Page
After the order info loads, there is a single "Confirm Payment" button; scenarios that support auto-launch need no extra tap. After payment completes, the result is shown in-page.
Payment Result Page
On success the customer lands on a green-checkmark success page (with secondary copy and ICP filing information); tapping "Done" exits the mini-program. The result page is a static end page — the order status was already confirmed on the payment page, and no duplicate lookup happens.
Authorization Page (Troubleshooting Tool)
A standalone page that fetches the current user's openId / userId (cached for 30 minutes, refreshable). Daily payments never land here (identity needs are handled silently inside the flow); use it manually when troubleshooting user-identity issues with JSAPI-type payments.
Development & Debugging
The mini-program home page provides debugging entries:
- QR terminal payment: the main card — scan or manually enter a QR terminal code to jump straight to the payment page;
- Unified cashier debug / aggregate pay debug: visible in dev mode only (removed automatically in production builds) — scan or enter an order number to jump straight to the corresponding page;
- Get user identifier: opens the authorization page.
Combined with orders generated by "Development Tools → Payment Debug (Gateway)" on the merchant panel, all three pipelines can be debugged end to end.
Platform Differences
WeChat / Alipay / Douyin share the same page structure (one codebase); only platform capabilities differ:
- On Alipay, the navigation bar is rendered transparent for a more immersive look;
- The Douyin payment channel is not integrated yet — page flows are currently rehearsed with simulated results; for real collection rely on WeChat / Alipay.
Related Links
- Publishing & Go-Live — domain verification, QR code rules, and platform review
- Payment Gateway (H5) — collection and relay in browser environments
- Gateway Payment — the three collection pipelines in detail