Key pair generation and validation
Merchants can use Alipay API Tool to generate key pairs, and validate whether the public key and private matches.
The following video explains how to generate and validate key pairs:
Key pair generation
Complete the following steps to generate a key pair:
- Download Alipay API Tool.
- Extract AlipayApiTool.zip.
- Depending on your operating system, execute Run_Windows.bat or Run_Mac.
- Click New to generate a key pair.
Key pair validation
Complete the following steps to validate your key pair:
- Depending on your operating system, execute Run_Windows.bat or Run_Mac.
- Enter your private key and public key in the fields.
- Click Validate to see whether the private key and public key matches.
Uploading your public key
RSA2 public keys and RSA public keys are uploaded by using different methods. For security reasons, RSA2 keys are strongly recommended.
RSA2 key
To upload your RSA2 public key to Alipay, complete the following steps.
- Log in to Alipay Global Site and go to Business Center -> Online Payment / Instore Payment Product.
- At My Order tab, click See Key.
- Find RSA2 Key Information and click Edit my public key.
- Enter your RSA2 key in the text box and then click SAVE.
RSA key
You can use RSA keys, but RSA2 keys are recommended. If you have to use RSA keys, provide your public key and PID to Alipay Technical Support (AlipayGlobalTechService@service.alipay.com) to upload the public key.
Viewing public key
To view Alipay public keys and your public keys, complete the following steps:
- Log in to Alipay Global Site ->Business Center -> Online Payment / Instore Payment Product -> See Key, and then click See my public key.
- Enter your payment password and then click Confirm.
You can then view your public key and Alipay public key. For example:
Note:
Alipay public key is only provided after you have uploaded your public key.