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

      Sandbox

      Sandbox is an environment where you can mimic the characteristics of the production environment and create simulated responses from all APIs the application relies on before going live. You can make API tests based on your own requirements, such as create a transaction, cancel or refund a transaction.


      #Gateway

      The sandbox gateway is https://mapi.alipaydev.com/gateway.do?


      #Maintenance schedule

      Alipay Sandbox is under maintenance starting on every Sunday at 12:00 GMT+8 and back online on Monday at 12:00 GMT+8. Access to the sandbox environment might be unavailable during this period.


      #Sandbox portal

      Access sandbox portal at https://isandbox.alipaydev.com/user/intlAccountDetails.htm

      In this portal, you can find information such as test account and sandbox app. See the following sections for details. 

      #Test account information

      You can obtain the test account information in Alipay Sandbox Development Portal. To access the portal, an Alipay merchant account is required. If you don't have the account, go to Alipay Sandbox Development Portal to sign up.


      Two types of test account exist: merchant test account and buyer test account.


      #Merchant test accounts

      Under Sandbox Accounts > Merchant, you can find the following information:

      • Merchant account: Fake email ID bounded with Merchant UID/PID.
      • Merchant UID/PID: Sandbox partner ID is composed of 16 digits beginning with 2088.
      • Fake Login password of Merchant UID/PID
      • Settlement currency: Settlement currency supported.
      • Signature algorithm: Sign type. DSA, RSA, and RSA2 are supported
      • MD5 Signature key: The MD5 key is provided by default. 
      • RSA(SHA1) Signature key: RSA key value. If you want to test the RSA signature, prepare an RSA key pair and then upload the public key by clicking Upload.
      • RSA2(SHA256) Signature key: RSA2 key value. If you want to test the RSA2 signature, prepare an RSA2 key pair and then upload the public key by clicking Upload.


      Note:

      More than one test accounts are provided, and the accounts are sorted by payment products. Find the right test account according to the payment product you want to test. For example, to test the Alipay Auto Debit product, use the account information provided under Alipay Auto Debit.


      #Buyer test account

      Under Sandbox Accounts > Buyer, you can find the following information:

      • Buyer accountUse this account to login to the Alipay Sandbox app. 
      • Buyer UID: Sandbox buyer ID is composed of 16 digits beginning with 2088.
      • Login password: Use this password  to login to the Alipay Sandbox app. 
      • Payment password: Use is password to pay in Alipay Sandbox app. 
      • Account balance: Account balance of the buyer test account. Click Top Up to top up the buyer test account.


      #Sandbox App

      Currently, only Android app is provided.

      1. Login to the Alipay Sandbox Development Portal, and then go to Alipay Sandbox App.
      2. Take one of the following steps:
      • Scan the QR code displayed on the page with a QR code reader on your Android device. 
        This will download and install the Sandbox App to your device.
      • Click the download link to download the Sandbox App to your computer.


      To login to the Alipay Sandbox App, use the buyer test account and login password that are provided in the portal under Sandbox Accounts > Buyer.


      #Reconciliation files

      You can obtain reconciliation files by the following methods:


      Notes:

      • File download in the Alipay global portal (Sandbox environment) is not available now.
      • Reconciliation files in the sandbox environment are only for reference. For example, the fields in the reconciliation files obtained from the sandbox environment and production environment might be different. Refer to the files obtained in the production environment for details.
      • No actual settlement occurs in the sandbox environment, therefore the settlement file in the sandbox environment only contains the file head.


      #Supported products

      The following products or services are currently supported:


      NameDescription
      New Cross-border Online PaymentPayment interface
      Refund interface
      Query interface
      HK Online PaymentPayment interface
      Refund interface
      Query interface
      Cross-border In-store PaymentPaymentinterface
      Cancel interface
      Refund interface
      Query interface
      Cancel interface
      HK In-store PaymentPayment interface
      Cancel interface
      Refund interface
      Query interface
      Cancel interface
      Auto-debitSign interface
      Payment interface
      Query interface
      gmportalNew agreement
      Query agreement
      Create store
      Create coupon
      Get coupon
      Cancel coupon
      Tax-refundTax-refund interface
      Pay - Refund interface
      Freeze - Pay - Refund interface
      Freeze - Pay - Unfreeze interface