Skip to main content
This guide explains how to integrate Alipay In-App payments using the Alipay SDK (AlipayHK or AlipayCN). This payment method is used within a native app environment and provides a seamless user experience.

SDK Download

To begin integration, download the official SDK packages below:

HTTP Request

Endpoint : /trade/v1/payment
Method : POST

Required Parameters

See Common Payment Parameters for shared fields.

Optional Parameters

Sample Request (Form Payload)

Response Fields (pay_params)

These fields are returned by QFPay and should be passed into the Alipay SDK.

Sample QFPay Response

Using Alipay SDK

After receiving the pay_params in the response, construct the orderInfo string required by the SDK in the following format:
  1. Join all fields in the format: key="value"
  2. Sort keys in ascending order (alphabetical)
  3. Concatenate with &
  4. Place sign and sign_type at the end

Sample

Make sure you:
  • Follow the correct SDK version and region (HK vs CN)
  • Use the exact key names and values returned in pay_params
  • Keep your sign logic consistent with Alipay SDK format