Alipay+ DocsAlipay+ Docs

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 key information for sandbox test, such as:
    • Gateway Endpoint: indicates the domain name that is assigned by Alipay+ to construct the API request URL. For more information, see the Request URL section in API Reference.
    • Client ID: used to specify the Client-Id parameter in the API request header. For more information, see the Request header section in API Reference.
    • Certification Type: indicates the method that is used by Alipay+ to sign an API request and validate the signature.
    • Participant ID: indicates the unique ID that is assigned by Alipay+ to identify an Acquiring Service Provider (ACQP). The value of this parameter in the sandbox can be used to:
      • specify the acquirerId parameter when calling the Alipay+ CDN server to obtain payment method information for Cashier Payment and Auto Debit.
      • recognize the participantId parameter involved in the reconciliation. For more information, see the Download reports chapter in Reconcile.
  • Financial Reports: contains information that is used to download sandbox financial reports in the SFTP server, including the login account, password, and SFTP URL.


Step 2: Configure the sandbox

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

1. Set a sandbox public key

To make your integration safer, Alipay+ uses asymmetric keys for API encryption and decryption. You need to upload your public key to get the Alipay+ public key.

On the Public key panel of the Sandbox > Settings page, complete the following 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 a production public key.

2. (Conditional) Set notification URLs

Alipay+ provides APIs such as authNotify, consultBinding, and userInitiatedPay to send notifications to the ACQP. To receive notifications from Alipay+, the ACQP needs to provide notification URLs on the Alipay+ Developer Center.

On the Notification URL panel, click Edit to specify the notification URLs for APIs that are shown as Required, so as to ensure that Alipay+ calls the API in the sandbox successfully.


Step 3: Test in the sandbox

When getting the sandbox ready, use development tools and resources to develop and test your application. Alipay+ provides the following tools and resources for developers:

  • iTest: used to create an API request. For more information about how to use iTest, see iTest.
  • iMock: used to simulate different API results and return specified responses. For more information about how to use iMock, see iMock.
  • iNotify: used to test whether the asynchronous notification can be received and is handled successfully. For more information about how to use iNotify, see iNotify.
  • Alipay+ ACQP SDKs: For more information, see Alipay+ ACQP SDKs.
  • Alipay+ Linker Wallet: used to simulate the process of making payments to the merchant side. For more information, see Alipay+ Linker Wallet.

You can find these tools and resources under the Sandbox > Tools tab.