Alipay Mini Program Release Guide

Published: 2021-01-04

I. Preliminary Preparation

1. Register an Alipay Mini Program

Merchants need to click the “Access Now” button on the homepage of the official Alipay Mini Program Platform website (https://open.alipay.com/channel/miniIndex.htm). They can use an existing Alipay account to scan the QR code and log in directly to the Alipay Mini Program Developer Platform.

1-1.1.png

After logging in, you need to complete the information before you can create a Mini Program. Note that you should select “Self-developed Developer”.

1-1.2.png

2. Create a Mini Program

After completing the information, you can create a Mini Program in Development Center — Mini Program Apps.

1-2.1.png

After the Mini Program information is completed, you can enter to view and manage the Mini Program.

1-2.2.png

If the application is not approved, you need to improve the information again and submit it according to the feedback.

3. Add Mini Program Features

Alipay Mini Program features need to be added by yourself in the Alipay Mini Program details. You can add Mini Program features in Development Management — Feature List. You need to check and add the two features “Get Member Information” and “Mini Program QR Code”.

1-3.1.png

II. Mini Program Release

1. Code Package Download

Code package download means downloading the Mini Program code package on the platform, uploading the code yourself through Alipay Developer Tools, and completing the Mini Program review and release operations through the Alipay Mini Program Platform.

1.1 Configure Mini Program Parameters

Log in to the management backend, click [Alipay Mini Program] -> click [Mini Program Configuration], and configure the Mini Program parameters: AppID (Mini Program ID), Alipay public key, and Mini Program application private key. The AppID can be obtained directly by logging in to the Alipay Mini Program backend — Mini Program Details page. The Mini Program application private key needs to be generated by downloading the Alipay key generation tool (Download link: https://docs.open.alipay.com/291/105971/). The Alipay public key needs to be obtained by uploading the Mini Program application public key to the Alipay Mini Program backend;

2-1.2.png

Note that after the Mini Program application private key and other information are generated, you need to keep them properly yourself. Once lost, they may need to be regenerated, which may affect the normal use of the published Mini Program.

1.2 Obtain Mini Program Application Key

When configuring an Alipay Mini Program, you need to generate a pair of RSA keys. The keys can be generated by downloading the Alipay key generation tool (Download link: https://docs.open.alipay.com/291/105971/). You need to distinguish between Windows computers and Apple computers.

2-2.1.png

Taking Windows as an example, after downloading the key tool, extract and open it yourself, find the “RSA Signature and Verification Tool” file, and double-click to open and run it.

Select “PKCS8 (for JAVA)” as the key format, select “2048” as the key length, and click Generate Key to generate the Mini Program application private key and Mini Program application public key.

2-2.4.png

The Mini Program application private key is used to fill in the platform backend, and the Mini Program application public key is used to fill in the Alipay Mini Program backend to obtain the Alipay public key.

Click “Open Key File Path” or directly open the RSA key folder to also find the generated Mini Program application public and private keys.




Note that after the Mini Program application private key and other information are generated, you need to keep them properly yourself. Once lost, they may need to be regenerated, which may affect the normal use of the published Mini Program.

1.3 Obtain Alipay Public Key

The Alipay public key needs to be obtained in the Alipay Mini Program backend — Settings — Development Settings. Click Set Application Public Key in the interface signature method and select “Set Application Public Key”. When setting, you need to verify the Alipay account, which can be done via SMS verification or payment password verification.

2-3.1.png

Fill the Mini Program application public key generated in 1.2 into the input box, click Save, and save the Mini Program application public key to the Alipay Mini Program backend. After saving successfully, you can view or modify the application public key or upload the application public key certificate on the same page.

2-3.5.png

Click View Alipay Public Key to view and copy the Alipay public key. The Alipay public key is also used to fill in the platform — Alipay Mini Program configuration.

1.4 Configure Mini Program Server Domain Names

Log in to the Alipay Mini Program backend. In the Mini Program Details page — Settings — Development Settings, configure the Mini Program server domain names. The detailed configuration is as follows:

2-4.1.png

Click to get server domain names

1.5 Download Code Package

After configuring the Mini Program parameters, on the “Package Code” page, click the [One-click Packaging] button to package and download the Mini Program;

2-5.1.png

After downloading, extract the Mini Program code package to a folder.

2-5.2.png
1.6 Install Alipay Mini Program Developer Tools

Go to the Alipay Mini Program Developer Tools download page (https://docs.alipay.com/mini/ide/download) to download and install the Alipay Mini Program Developer Tools.

2-6.1.png

Note that you should download the corresponding version according to your computer. For Windows, please download the Windows version; for Apple computers, please download the mac version.

1.7 Import Mini Program Code Package and Upload

Open the Alipay Mini Program Developer Tools and select Open Project.

2-7.1.png

Select the project directory, find and select the Mini Program folder just extracted, and then the Mini Program project can be opened.

2-7.2.png

After opening the Mini Program project, a developer member needs to log in before uploading and releasing. Developer members can be added through the Alipay Mini Program backend — Mini Program Details — Member Management.

2-7.3.png

You can preview the Mini Program in the Alipay Mini Program Developer Tools and upload the Mini Program code to the Alipay Mini Program backend.

1.8 Preview and Submit for Review

Log in to the Alipay Mini Program backend. In Development Management, you can see the Mini Program uploaded in the previous step.

2-8.1.png

Use the Alipay APP to scan the trial code to preview the Mini Program (you need to add it in Member Management first).

After previewing, click Submit for Review to submit the Mini Program to Alipay for review. After the Alipay review is passed, return to this page to release the Mini Program. If the review is not passed, you need to modify it according to Alipay's review comments and resubmit for review.

III. Notes

1. Alipay Mini Programs currently only support the release method of downloading code and uploading it yourself.

2. Before submitting the Mini Program for review, please carefully read the “Alipay Mini Program Operations Specifications” and carefully check the Mini Program content to improve the probability of passing the Mini Program review.

3. Alipay Mini Programs can be opened through the Alipay APP.

4. Alipay Mini Programs currently have few open capabilities; please stay tuned for more features.