Develop in the sandbox

Note: Since the sandbox is an emulated environment, all tests in the sandbox do not take effect in the production environment. All returned codes and processing logic need to be consistent with those in the production environment.

Step 1: Receive sandbox resources

After the application is created, sandbox resources are automatically allocated to you. On the Sandbox > Settings page, check your sandbox resources, which include the following two parts:

  • Integration Information: contains information that is used to test APIs in the sandbox, such as Gateway Endpoint, Client ID, Certification Type, and Participant ID.
  • Financial Reports: contains information that is used to perform the reconciliation in the sandbox. With these resources, you can download the sandbox financial reports in the SFTP server.

Step 2: Configure the sandbox

To configure the sandbox on the Settings page, complete the following tasks.

1. Check the Client ID

Each application is automatically assigned a unique Client ID. The value of Client ID is used to specify the Client-Id parameter in the API request header. Note that the value here is only used for the sandbox.


For more information about how to use this parameter, see the Request header section in API Reference.

2. Set a sandbox public key

To make your integration safer, Alipay+ uses asymmetric keys for API encryption and decryption.

Thus, you need to upload your public key to get the Alipay+ public key. Follow these steps:

a. Click the Edit Your Public Key button.


b. On the Edit Your Public Key page, click the respective link to download the tool that is provided by Alipay+.


c. Open the zipped folder and run the Run.bat file.


b. Click the New button to generate a key pair.


e. Copy the public key and enter it on the Edit Your Public Key page.


f. Click the Submit button to upload your public key.

After submission, the Alipay+ public key is generated automatically. You can click the respective button to view or copy the Alipay+ public key.


Note: Your public key that is used in the sandbox must be different from the one in the production environment. For more information about getting the Alipay+ public key for the production environment, see Set public key for production environment.

3. (Optional) Set notification URL

On the Notification URL panel, click Edit to specify the notification URL of the specific API, so as to ensure that Alipay+ calls the API successfully.