Alipay+ Rewards integration guide
Alipay+ Rewards is a global rewards and digital service marketplace provided by
Alipay+ for merchants and users to gain benefits from
Alipay+. This document describes the integration steps to enable
Alipay+ Rewards for wallet apps. After the integration, users can open
Alipay+ Rewards directly in the wallet app.
Before you integrate Alipay+ client SDK for Alipay+ Rewards, make sure that you finish the following tasks:
- Check the requirements.
- Import and initialize the client SDK.
- Register the OAuthService and DeepLinkService.
Note: Each wallet must support the Deep Link ability to redirect users to the local payment page (for example, the payment code or the collection code page) of the current wallet.
These prerequisites are subject to the client-side OS. For details about prerequisites, see the Requirements section and the Getting Started section in Android integration guide and iOS integration guide.
You need to call the following SPIs.
Alipay+ client SDK uses the
getAuthCode interface to obtain the authorization code from the wallet. Through the authorization code, Alipay+ can obtain the corresponding user information. Then, Alipay+ Rewards enables users to collect rewards from Alipay+.
If you have already called this interface, you can reuse it; Otherwise, must call this interface via the
getAuthCode method. For details about the interface specification, see getAuthCode.
Alipay+ Rewards opens a scheme and users are redirected to target apps to consume rewards. For details about the interface specification, see open.
In Alipay+ Rewards, the following scenes might be routed:
Open a new H5 page in the app container
Value: String that describes the H5 page to be redirected. The value is required.
Use the camera to scan the QR code
Display the QR code for the User-presented Mode Payment
Value: String that follows ISO3166. The value is optional.
Open the page to bind bank cards
Open the scheme or deep-link
Open the page to top up
Alipay+ SDK controls the redirection between in-app pages by adding scene code and app ID to the whitelist. And wallets can control the redirection between wallet apps and other apps by adding the whitelist or blacklist for scheme and app ID. The following process flow illustrates how to route to destination scenes.
Alipay+ provides a unified API, which is named
my.navigateToBizScene, to route users to a specific scene.
If all required scenes can be routed by schemes or deep links, wallets implement the open scheme SPI only. Otherwise, wallets implement both the open scheme SPI and open sceneCode SPI. For details about the SPI implementation, see open scheme and open sceneCode.
You need to call the following APIs.
Alipay+ client SDK provides the
openACCenter API to open the Alipay+ Rewards Mini Program. For details about this interface implementation, see openACCenter.