(Optional) Add features

With this topic, you can learn the steps to add features provided by Alipay+ Mini Program Platform to implement certain capabilities on your mini program.

Overview

Features refer to a set of JSAPIs or openAPIs provided by Alipay+ Mini Program Platform. You can add certain features to achieve specific capabilities on your mini program, for example, the message sending feature or the user authorization feature.

Procedures

For detailed steps to add features to your mini program, check below:

Step 1: Configure signature keys

This step is required for the features that contain openAPIs. To learn more, see Supported openAPI features.

To configure signature keys, follow the steps below:

  1. Go to Mini Programs and click on a mini program you created.

image

  1. Go to Development Configuration. This is where you can view your client ID, configure the merchant public key, and get the platform public key.

Note:

    • To get the platform public key, you need to configure the merchant public key first.
    • If you cannot see the client ID, contact our technical support to set the client ID first.

image

When calling an openAPI, the merchant signs with its own private key, and Alipay+ Mini Program Platform validates the signature through the merchant public key. When receiving the platform's response, the merchant validates the signature through the platform public key. To learn more, check below:

  • The client ID is the ID assigned by the Platform to identify a merchant. The merchant needs to pass the client ID in an API call.
  • The platform public key is generated by Alipay+ Mini Program Platform. Merchants use this key to validate the signature when calling an openAPI.
  • The merchant public key is configured by merchants. Alipay+ Mini Program Platform uses this key to validate the signature when calling an openAPI.
  1. To configure the merchant public key, click Add. In the pop-up window, enter a public key value generated by the RSA2 algorithm, within 600 characters. Then click "Add".

image

  1. Now you can see the platform public key. Click Copy to get the platform or the merchant public key value. Click Edit and enter a new value to modify the merchant public key.

image

Note: The request URL for openAPI is http://open-sea.alipayplus.com/api/open/{restful_path}, where restful_path refers to the path to the interface, for example, /v2/authorizations/applyToken.

Step 2: Add features

  1. Click the Features tab. This is where you can add, view and manage features.

image

  1. Click +Add Features. In the pop-up window, choose one or more features you want to add, have them checked, then click Add.

image

  1. Now the features are added. To delete a feature, click Delete under the Action tab. In the pop-up window, click Delete to confirm the action.

Note: Currently, the features that contain openAPIs cannot be deleted.

image.png

Supported openAPI features

The table below lists the supported openAPI features provided by Alipay+ Mini Program Platform:

Feature

OpenAPI included

Description

Supported super app

App user authorization

/v2/authorizations/applyToken

/v2/authorizations/revoke

/v2/users/inquiryUserInfo

Enables mini programs to get basic user information from super apps, in order to gain user authorization to provide services via mini programs.

  • Alipay CN (Alipay China)
  • Alipay HK
  • Alipay MO
  • Chope

Note: /v2/authorizations/revoke is not supported in Alipay CN.

Send message

/v2/miniprogram/message/send

Enables mini programs to send super app inbox messages to users.

  • Alipay CN
  • Chope

QR code management

/v2/miniprogram/qrcode/create

Enables mini program developers to create and manage QR codes to redirect users to certain pages on the mini program.

Supports super apps with QR code scanning capability.

Note:

Next steps

Upload mini programs