Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

Pre-production testing instructions

If you are integrating Alipay products for the first time, you need to migrate from the sandbox environment to the production environment by completing the following steps:

  1. Configure in Alipay Developer Center.

Go to Alipay Developer Center, enter Integration Settings, and select the Production tab. Then set up the keys for the production environment and obtain the Alipay public key. Record the client ID for the production environment, which will be used in your project for going live.

image.png

Figure 1. Configure in Alipay Developer Center

  1. Launch your application in Alipay Developer Center.

In Alipay Developer Center, click the application you created, find Basic Information, and click Launch. If this step fails, contact Alipay Merchant Service business support to confirm the business contract signing status.

image.png

Figure 2. Launch your application

  1. Configure your project.

Update keys and client ID in the request in your project with the ones for the production environment. Then, remove "/sandbox" in the service URL. For example, change "/ams/sandbox/api/v1/payments/pay" to "/ams/api/v1/payments/pay".

  1. Configure the whitelist.

Provide your redirect URL to Alipay technical support for whitelist configuration. In Cashier Payment, the redirect URL is the value of paymentRedirectUrl in the pay interface. In Auto Debit, the redirect URL is the value of authRedirectUrl in the consult interface. After the configuration is completed, you can initiate calls to Alipay in the production environment. If this step fails, contact Alipay technical support.

  1. Test in the production environment.

Prepare an in-use e-wallet account for testing in the production environment. If you cannot prepare such an account, contact Alipay technical support for paid use.

  1. Start the acceptance process.

By now, you can start the product acceptance process according to your own needs. Alipay also provides a set of recommended acceptance cases for developers.

If your application has successfully integrated this product, the application can directly integrate other wallets in the production environment without testing in the sandbox by completing the following steps:

  1. Confirm the business contract.

Confirm with Alipay Merchant Service business support whether you have signed business contract of the new wallets.

  1. Configure in the Cashier Payment interface.

If the product you integrate is Cashier Payment, use the value of paymentMethod.paymentMethodType in the pay interface to specify the new wallet. At the same time, change the value of paymentAmount.currency and order.orderAmount.currency to the local currency of the corresponding country of wallet. Note that the value of orderAmount.value is in the smallest currency unit. For example, if the value is 100, the amount is ₩100 when the currency is KRW, or Rp100 when the currency is IDR.

  1. Configure in the Auto Debit interface.

If the product you integrate is Auto Debit, use the value of customerBelongsTo in the consult interface and the applyToken interface to specify the new wallet. At the same time, change paymentAmount.currency and order.orderAmount.currency to the local currency of the corresponding country of wallet. Note that the value of orderAmount.value is in the smallest currency unit. For example, if the value is 100, the amount is ₩100 when the currency is KRW, or Rp100 when the currency is IDR.

  1. Test in the production environment.

Prepare an in-use e-wallet account for testing in the production environment. If you cannot prepare such an account, contact Alipay technical support for paid use.

  1. Start the acceptance process.

By now, you can start product acceptance process according to your own needs. Alipay also provides a set of recommended acceptance cases for developers.