(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:
- Go to Mini Programs and click on a mini program you created.
- 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.
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.
- 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".
- 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.
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
- Click the Features tab. This is where you can add, view and manage features.
- Click +Add Features. In the pop-up window, choose one or more features you want to add, have them checked, then click Add.
- 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.
Supported openAPI features
The table below lists the supported openAPI features provided by AIMPDP:
Feature | OpenAPI included | Description | Supported super app |
App user authorization | Enables mini programs to get basic user information from super apps, in order to gain user authorization to provide services via mini programs. |
Note: | |
Send message | Enables mini programs to send super app inbox messages to users. |
| |
QR code management | 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. |
Supported JSAPI features
The table below lists the supported JSAPI features:
Feature | JSAPI included | Description | Supported super app |
Note:
- For mini programs launched to Alipay+ partner apps, refer to the Alipay+ user authorization solution.
- For mini programs launched to Alipay China, refer to the Alipay China user authorization solution.