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

      Instruction for pre-production test

      If you are integrating our 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 Developers Center.

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

      1. Launch your application in Alipay Developers Center.

      In Alipay Developers 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.

      1. Configure in 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 Payment interface. In Auto Debit, the redirect URL is the value of authRedirectUrl in the Authorization 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 Payment 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. Change accordingly the wallet name and currency of the notification in the Payment Result Notification interface and the response in the Payment Inquiry interface. Please 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 Authorization Consult interface and the Access Token Application 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. Change accordingly the wallet name and currency of response in the Payment Inquiry interface. Please 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.


      For more information about test cases for Cashier Payment and Auto Debit, see Test Cases for Cashier Payment and Test Cases for Auto Debit.