Alipay+ DocsAlipay+ Docs

Alipay+ Rewards integration guide

Introduction

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.

Prerequisites

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.

Overall procedure

  1. Call SPIs
  2. Call APIs

Call SPIs

You need to call the following SPIs.

getAuthCode interface

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+.

Note:

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.

open interface

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:

Scene code

Scenario

JSAPI parameters

WEB_PAGE

Open a new H5 page in the app container

Key: url

Value: String that describes the H5 page to be redirected. The value is required.

Example: {"url": "https://h5.m.taobao.com/alicare/index.html?attemptquery=%E6%84%8F%E8%A7%81%E5%8F%8D%E9%A6%88"}

SCAN

Use the camera to scan the QR code

N/A

QR_PAY

Display the QR code for the User-presented Mode Payment

Key: region

Value: String that follows ISO3166. The value is optional.

Example: {"region":"JP"}

BIND_CARD

Open the page to bind bank cards

N/A

SCHEME

Open the scheme or deep-link

Key: scheme
Value: String that describes the scheme or deep-link to be redirected. The value is required.

Example: {"scheme": "market://details?id=com.ltgames.android.snail"}

TOP_UP

Open the page to top up

N/A

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+ Rewards integration guide

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.

Call APIs

You need to call the following APIs.

openACCenter interface

Alipay+ client SDK provides the openACCenter API to open the Alipay+ Rewards Mini Program. For details about this interface implementation, see openACCenter.