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


iDiagnose is a function provided by Alipay sandbox to help you to pinpoint errors when certain error codes are returned in the integration process. With iDiagnose, you can improve integration efficiency and quality with lower integration cost and better user experience.

By now, iDiagnose supports the following error codes:


Before using iDiagnose, you must have an Alipay merchant account. If you don't have one, go to Alipay portal to sign up. The following video explains how to create an Alipay merchant account:


When ILLEGAL_SIGN error occurs, you can try the following steps to diagnose.

Firtstly login to iSandbox, go to Global Products, and select iDiagnose under Sandbox Tool. Select error code ILLEGAL_SIGN, product, API, and then click Start. Follow the steps below to pinpoint the error. You can adjust your integration according to the diagnose results in each step.


  • You can go to the next step only after errors that occur in the current step are fixed.
  • Ensure that all required parameters are passed in. See API docs for details.
  • If the cause of ILLEGAL_SIGN is still not found, please contact Technical Support for help.

Step 1. Verify the private key

This step is to check whether the private key used is correct. Before you start, please upload the public key that is paired with the private key to be verified. 

If your private key is incorrect, correct it before you proceed to the next step.

Step 2. Check the pre-sign string

This step is to check whether your pre-sign string is correct. Except for sign and sign_type, all parameters used must be signed. 

If your pre-sign string is incorrect, correct the pre-sign string before you proceed to the next step.

Step 3. Check the signature

This step is to check whether the signature is correctly generated. If not, correct the result before you proceed to the next step.

Step 4. Check the final URL (skip this step if POST method is used)

This step is to check whether the request URL is correct, especially,  whether all parameters are connected in the correct format in this step.


When INVALID_PARAMETER error occurs, you can try the following steps to diagnose.

Login to iSandboxgo to Global Products, and select iDiagnose under Sandbox ToolSelect error code INVALID_PARAMETER, and API (the API can be automatically matched if you select automatic matching). Then enter the request URL to pinpoint errors. The diagnostics result is then displayed. You can adjust your request accordingly.

Result sample

Sample success

The request of is valid
The request contains all required parameters, and the request format is correct

Sample missing required parameters

One or more required parameters are missing in the request

Sample invalid format

The request format of is invalid