<Back to the list

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 including making a transaction, cancel, or refund a transaction, and so on.

Sandbox gateway

Use the Alipay Sandbox gateway for testing. The URL of the Sandbox gateway is:
https://mapi.alipaydev.com/gateway.do?

Sandbox test account

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

Watch the video below to have a quick overview of Alipay Sandbox portal:

There are two types of test account: merchant test account and buyer test account.

Merchant test accounts

Find the merchant test account information in the Alipay Sandbox portal under Sandbox Accounts > Merchant. More than one test accounts are provided, and the accounts are sorted by payment product. Find the correct one to use 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.

  • Signature key
    The MD5 key is provided by default. If you want to test the RSA signature, prepare an RSA key pair and then upload the public key by clicking Upload.
  • Login password
    Use this password to access Alipay global portal (Sandbox environment)

Buyer test account

Use the buyer test account to login to the Alipay Sandbox app.
The buyer test account information can be found in the Alipay Sandbox portal under Sandbox Accounts > Buyer.

Account balance: You can click Top Up to top up the buyer test account.

Sandbox app

Note:
The Alipay Sandbox App supports only Android at this time.

  1. Login to the Alipay Sandbox 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.

Supported products

Product Interface Remark
New Cross-border Online Payment
  • Pay
  • Refund
  • Query
  • -
    HK Online Payment
  • Pay
  • Refund
  • Query
  • -
    Cross-border In-store Payment
  • Pay
  • Cancel
  • Refund
  • Query
  • Cancel
  • -
    HK In-store Payment
  • Pay
  • Cancel
  • Refund
  • Query
  • Cancel
  • -
    Auto-debit
  • Sign
  • Pay
  • Query
  • -
    gmportal
  • New agreement
  • Query agreement
  • Create store
  • Create coupon
  • Get coupon
  • Cancel coupon
  • -
    Sandbox Reconciliation Files
  • Download
  • Scheduled notification
  • Contact Technical Support.
    Globalprod Reconciliation Files
  • SFTP Download
  • Login to Alipay Portal (Sandbox environment), and then go to My Alipay to download the reconciliation files.
    Tax-refund
  • Tax-refund
  • Pay - Refund
  • Freeze - Pay - Refund
  • Freeze - Pay - Unfreeze
  • -

    客服小机器人

    NEED HELP ?