WeChat Pay
Channel Overview
WeChat Pay is Tencent's payment service inside WeChat. DaxPay integrates via API v3 certificate mode and supports both direct and ISV products, covering JSAPI, mini-program, QR code (Native), APP, H5, and barcode methods, plus profit sharing and transfers to user wallets.
The full integration tutorial for WeChat Pay (direct) — the two required credential sets and the app-type matrix — lives in Channel Integration; this page is the parameter and structure reference.
Payment Products
| Product | Mode | Suitable for |
|---|---|---|
wechat_pay (direct) | Merchant direct | Merchants with their own WeChat Pay mchId |
wechat_isv (ISV) | ISV collects on behalf of sub-merchants | Service providers collecting for contracted merchants |
Supported Payment Methods
| Method | Description | Prerequisite |
|---|---|---|
wechat_qr (QR code) | Native payment, returns a QR code | — |
wechat_jsapi (JSAPI) | In-WeChat web page payment | Requires openId; bind an Official Account app |
wechat_mini (mini-program) | Payment inside a WeChat mini-program | Requires openId; bind a mini-program app |
wechat_app (APP) | Invokes WeChat from the merchant app | — |
wechat_h5 (H5) | External browser payment | — |
wechat_barcode (barcode) | Merchant scans the user's payment code | — |
JSAPI and mini-program payments depend on an openId: register a WeChat app of the matching type (Official Account / mini-program) under "App Management" and associate it in the capability binding.
Configuration Structure
WeChat keys are configured per merchant number (in ISV mode one key set serves all sub-merchants); app information is maintained separately:
- Create the channel merchant: Merchant Workbench → Channel Merchants → Create, pick the product and fill in:
- Direct: merchant name + WeChat Pay merchant ID (mchId)
- ISV: merchant name + sub-merchant ID (subMchId)
- Configure keys (Channel Merchant Detail → Basic Management → Key Configuration for direct; under the ISV product for ISV):
| Group | Field | Notes |
|---|---|---|
| API key | API v3 key | Set in the merchant portal under "API Security" |
| Payment certificates | Merchant API certificate | apiclient_cert, upload |
| Merchant API certificate private key | apiclient_key, upload | |
| Certificate serial number | Matches the uploaded certificate | |
| Public key / public key ID | New WeChat Pay public-key mode; leave empty for platform-certificate mode |
- Register apps (the "WeChat Apps" page, platform apps / merchant apps): app name, app type (Official Account / mini-program / mobile app), AppId, and AppSecret; then bind apps to payment capabilities.
Callback Handling
- Async notifications are encrypted; the platform verifies the callback headers (
Wechatpay-Serial/Wechatpay-Signatureetc.), decrypts, and answers{"code":"SUCCESS"}; - Callback URLs are generated by the platform; no per-order configuration in the WeChat console;
- If no acknowledgment arrives within 5 seconds, WeChat retries on schedule.
Notes
- Switch the environment before creating merchants: one set per environment;
- The merchant API certificate expires — renew it in the WeChat merchant portal and update the configuration;
- In ISV mode the "sub-merchant ID" and the "service provider mchId" are different numbers; keys are configured against the service provider number;
- See the FAQ for sub-merchant questions.