Skip to content

Developer Debugging ​

Updated: 10/15/26, 10:20:22 AM

The four debugging tools target administrators and integration parties: initiate real calls from the page, no code involved, to verify config and signatures. Menu: Developer Debugging.

The debugging tools call with the real merchant and app configs (not a sandbox simulator); the orders they create are real orders — remember to close or refund them after verification.

Payment Debugging (Standard) ​

Simulates a merchant calling the unified payment API to initiate a payment, verifying the whole chain of "key config + signature + routing + channel merchant":

  1. Set the merchant private key: fill in the merchant's RSA private key (kept in this browser only; re-enter it when switching computers);
  2. Pick the routing mode:
    • Follow channel routing: pick merchant + app + pay method, resolved by channel routing — the first choice for verifying routing config;
    • Specify directly: pick merchant + channel merchant + pay capability, skipping routing — for isolating issues with the channel merchant itself;
  3. Fill in the order: the order number can be generated with one click; the amount unit is fen; JSAPI / mini-program methods need an openId first (obtain one with auth debugging); in the barcode scenario fill in the authCode and the pay method can be left empty (WeChat / Alipay / UnionPay is auto-detected from the code prefix);
  4. Submit the payment: the browser signs locally and calls the API directly; the result dialog renders per the return form — redirect link / QR code for scanning, JSAPI params viewable as JSON; business failures (wrong signature, wrong params) also pop up, showing the error code.

Advanced params (sync return URL, attached params, pay-type restrictions such as disabling credit cards, extra params JSON) expand as needed.

Gateway Payment Debugging ​

Verifies the pre-order of gateway payment (unified cashier / aggregate QR): pick the gateway type (cashier / aggregate QR) → merchant + app → order info → submit the pre-order; the result page gives the landing-page link and the mini-program link (each with a QR code — scan to experience the full cashier flow).

Signature Debugging ​

A standalone tool for integration parties to troubleshoot signature problems, independent of merchant config:

TabInputOutput
Generate signatureParams JSON to sign + RSA private keyThe string-to-sign + the signature value (copyable)
Verify signatureParams JSON (without sign) + signature value + RSA public keyPass / fail

When merchant callback verification fails or the API reports a signature error, use this tool to compare whether both sides assemble the string-to-sign identically (usually a param-order or encoding difference).

Auth Debugging ​

Verifies whether the OAuth flow can obtain an openId (a prerequisite of JSAPI / mini-program payments):

  • Auth types: Alipay H5, WeChat Official Account, WeChat Pay, Douyin H5, Douyin Pay (mini-program openId debugging has moved into the cashier mini program);
  • WeChat Pay / Douyin Pay require picking a merchant and the corresponding app (platform app or merchant app); the other types use the credentials from the platform-level config directly;
  • Click "Generate authorization link" to get a QR code; scan it with a phone to complete the authorization; the page polls the result every 3 seconds and, on success, shows the openId / userId / accessToken (copyable — paste it into the openId field of payment debugging).

A QR code expires once the authorization succeeds; regenerate it for repeated tests.

Common troubleshooting paths

"JSAPI payment reports an openId/app mismatch" → obtain an openId with auth debugging and confirm the app used is the same source as the channelAppId passed at payment time; "order placement reports a signature error" → compare the signature strings with signature debugging; "order placement reports no usable channel merchant" → check the hit preview in channel routing.