Supported Scenarios
In-App payments are suitable for:- Native apps with built-in shopping or payment features
- Invoking wallet payment modules via SDKs (e.g. WeChat, Alipay)
- Letting users initiate payment inside the app and redirect to a wallet to complete payment
Common Wallets and Transaction Types
Refer to the following table forpay_type values and related documentation:
Common Integration Methods
- SDK Mode: The merchant app uses a third-party SDK to call wallet APIs
- URL Scheme / Deep Link: Merchant generates a payment link and redirects to the wallet App
- Redirect Back to App: After payment is completed, the wallet redirects back to the merchant app (requires setting a return URL or deep link binding)
General API Flow
Most In-App payment types use thePOST /trade/v1/payment endpoint to initiate payment requests. The response will include pay_params or a pay_url, which is then passed to the SDK or used to trigger a redirect.
Refer to the documentation of each wallet for specific request and response formats.
Important Notes
- Each wallet has different requirements — check if App payment permission needs to be pre-approved (e.g. WeChat SDK AppID, Alipay Merchant Setup)
- Always test redirect and return flow thoroughly to ensure the app receives the payment result properly
- It’s recommended to use the Transaction Enquiry API to confirm the final payment status, especially if the app is closed before receiving the callback

