Skip to content

Payment Capability Provisioning ​

Updated: 12/1/26, 2:39:36 PM

This is the third stage of the Complete Go-Live Guide: making the platform able to collect payments. The mainline is "product environment → channel merchants and keys → payment apps → channel routing → verification", and the steps have strict ordering dependencies — getting the order wrong triggers either an environment mismatch or an unresolvable route.

Channel-side material applications (WeChat / Alipay merchant platforms) are not covered here — see Channel Integration and the per-channel pages under Payment Channels.

Provisioning Mainline ​

Product Environment ​

Menu path: Payment Management → Access Configuration → Payment Product Configuration

Two layers of environment control (mechanism details in Payment Product Configuration):

LayerControlled byProduction requirement
Global switchDeployment config sandbox-enabledForced to false in PROD mode; at startup, leftover sandbox products are reset to production automatically
Product environmentThe environment radio on the product cardBefore going live, confirm every product is on "production"

Payment product configuration page

Figure: Product cards on the payment product configuration page — "Production / Sandbox" environment tags at the upper-right corner; confirm each card is on production before going live

Environment snapshot rule (the mechanism most easily tripped over at go-live): a channel merchant freezes a snapshot of the product's environment at creation time, and it never changes when the product switches afterwards. A channel merchant whose environment does not match is excluded by routing, and orders fail outright. Therefore:

  • Channel merchants created during sandbox integration cannot be reused for production — production needs a separate set of channel merchants and keys;
  • The "Payment Master Data" pages are read-only (channels / products / capabilities / channels / methods); the operations side only verifies them and never needs to care about creation order.

Channel Merchants and Keys ​

Entry: Merchant Workbench → Payment Configuration → Channel Merchants (the global list is under Merchant Management → Channel Merchants, but creation still goes through the workbench)

Production provisioning points (creation and key details in Channel Merchants and Channel Integration):

  • Switch the product environment first, then create channel merchants (the environment is frozen — see the previous section);
  • A merchant that collects must have at least one enabled channel merchant; routing, the gateway, and allocation all hang off it;
  • The payment product and the system channel merchant number cannot be changed after creation; only the name is editable;
  • Key configuration entries are split by mode:
    • Direct mode (WeChat direct, Alipay direct, etc.): transaction keys are configured in the channel merchant detail — WeChat under "Basic Management → Direct Key Configuration", Alipay under "App Management → app card → Key Configuration";
    • ISV mode (WeChat / Alipay ISV): platform-level keys live in the "ISV Keys" drawer on the product configuration page, one set per sandbox / production; merchant onboarding only records the "number", not keys;
  • Keeping one set each for sandbox and production is normal (the sandbox supports Alipay direct only; WeChat can only be verified with a small real payment — see Channel Integration - WeChat Pay (direct)).

Payment Apps ​

Menu path: Payment Management → Payment Apps

WeChat / Douyin collection requires a registered payment app (where the AppId lives). Two hard rules (types and binding details in Payment Apps):

  • A pay method is hard-bound to an app type: wechat_jsapi only accepts an official account, wechat_mini only a mini program, wechat_app only a mobile app. Register the matching type before collecting through it, or routing cannot resolve; changing the app type on edit clears incompatible capability bindings;
  • 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 / 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. This directly affects Gateway Collection Go-Live.

Channel Routing ​

Entry: Merchant Workbench → App Management → App Workbench → Channel Routing

Routing decides "which channel merchant each pay method goes to". Production points (the two strategies are detailed in Channel Routing):

  • Choose one of two strategies: by channel default (basic mode, one channel merchant per channel) or by pay method (scene mode, method + capability configured in pairs); the current version has no round-robin / weights / priority — one dimension maps to exactly one channel merchant;
  • After switching the strategy dimension you must click "Set as currently effective" and confirm; moving the radio button alone does nothing, which is a common cause of "routing is configured but orders still fail";
  • The first visit initializes a default strategy but without channel merchants, so you must fill them in by hand;
  • When done, use the "routing hit preview" to check the channel merchant hit by each pay method and any gaps.

Domain Verification ​

WeChat / Alipay fetch a verification file under the payment gateway domain when you configure domains and QR code rules, to confirm ownership. Two scenarios, two entries — do not upload to the wrong owner (mechanism details in Channel Integration - Domain Verification Files):

ScenarioVerification fileUpload entryWhen it is needed
Merchant levelMP_verify_*.txtMerchant panel / Merchant Workbench → "Domain Verification Files"The merchant's own official-account web authorization and mini-program business domains
Platform levelRandom-name .txt / .htmlPayment Management → Access Configuration → Domain Verification FilesThe cashier / aggregate mini program's "scan plain-link QR code" rules, and Alipay linked plain QR codes

The gateway-side reverse proxy that answers these file requests is already reserved in Infrastructure — no nginx change is needed after uploading, but the domain must be publicly reachable first.

Payment Security and Risk Control ​

Menu path: Payment Management → Payment Security

Risk control is an IP-level defense line (open-source edition). The relationship between the four pages and every switch is detailed in Payment Security and Risk Control. Defaults production must know:

ItemDefaultProduction advice
Master risk-control switchOnKeep it on; turning it off skips every check and produces no hit records
Blacklist blockingOnKeep it on (the list is entirely manual; there is no automatic blocking)
Overseas IP / region blockingOffDecide by business scope; IPv6 matching accuracy is limited, so enable with care
Block the order on a hitOnRecommend turning it off at first (record only, no blocking), then enable it once you see no false positives
API signature verificationMandatoryCannot be turned off
Nonce anti-replay / time windowOffEvaluate like System Security Policy: requires merchant requests to carry a nonce and timestamp

Note: risk-control checks run at order creation (covering standard, gateway, and QR code orders); refunds and transfers bypass risk control. On a blocked hit the merchant only sees a generic "transaction restricted" message (details are deliberately hidden); for diagnosis see "Risk Hit Records".

Verification ​

Once each product is provisioned, run through "Development & Debug → Payment Debug (Normal)" in the merchant panel (operation steps in From Deployment to First Payment - Step 8):

  • In production, verify the whole chain with a small real payment (e.g. 0.01 yuan): order → pay → callback → order successful;
  • WeChat has no sandbox, so a small real payment is the only option anyway;
  • If verification fails, troubleshoot per pay method one link at a time: routing hit preview → payment app type → channel keys → product environment. For common error mappings see Channel Integration - FAQ.

Checklist for This Stage ​

Next stage: Merchant Onboarding and Integration Readiness.