Skip to content

Alipay ​

Updated: 10/16/26, 9:52:44 AM

Channel Overview ​

Alipay is China's largest third-party payment platform. DaxPay supports both direct and ISV (service provider) integration, covering QR code, JSAPI, APP, H5, PC web, and barcode methods, with profit-sharing receivers and transfers supported as well.

The full integration tutorial for Alipay (direct) — channel-side preparation, key configuration, sandbox testing, public-key vs certificate modes — lives in Channel Integration; this page is the parameter and structure reference.

Payment Products ​

ProductModeSuitable for
alipay (direct)Merchant directMerchants with their own Alipay merchant account
alipay_isv (ISV)ISV collects on behalf of sub-merchantsService providers collecting for contracted merchants

Supported Payment Methods ​

MethodDescriptionPrerequisite
alipay_qr (QR code)Returns a QR code for the user to scan—
alipay_jsapi (JSAPI)In-app invocation, including mini-programsRequires openId; app type must be mini-program
alipay_app (APP)Invokes Alipay from the merchant appApp type must be mobile app
alipay_h5 (H5)Payment inside a mobile web page—
alipay_pc (PC web)Payment on a desktop website—
alipay_barcode (barcode)Merchant scans the user's payment code—

Configuration Structure ​

Alipay is organized in three layers — channel merchant → app → app keys. Keys are configured per app, not per channel merchant:

  1. Create the channel merchant: Merchant Workbench → Channel Merchants → Create, pick the product and fill in:
    • Direct: merchant name + Alipay merchant user ID (the PID starting with 2088)
    • ISV: merchant name + Alipay app (dropdown) + sub-merchant ID + app authorization token (can be added later)
  2. Register apps (direct: Channel Merchant Detail → App Management; ISV: the "Alipay ISV Apps" page): app name, app type (mini-program / mobile app / web app), and the Alipay AppId
  3. Configure app keys: App detail → Key Configuration, pick one auth type:
GroupFieldNotes
BasicEnvironmentProduction / sandbox
App IDAlipay AppId
Auth typePublic key mode or certificate mode
Keys (public-key mode)Alipay public keyFrom the open platform "Keys" page
App private keyGenerated by the key tool
Certificate modeApp public key cert / Alipay public key cert / Alipay root certAll three are required; more secure
Communication keyAES communication keyOptional

Callback Handling ​

  • Async notifications are POSTed to the callback URL; the platform verifies, updates the order, and answers success;
  • WAIT_BUYER_PAY is an intermediate state, not a payment success — the platform records and ignores it;
  • Callback URLs are generated by the platform; no per-app configuration in the Alipay console is needed.

Notes ​

  • Switch the environment before creating merchants: keep one set of channel merchants per environment; mismatched merchants are excluded by routing;
  • Certificate mode is more secure and recommended for production;
  • JSAPI requires an openId and a mini-program type app;
  • The sub-merchant authorization token expires; update it from the channel merchant detail ("app authorization token") manually or via delegated authorization;
  • See the FAQ for troubleshooting.