Alipay
Add Alipay payment provider to your application
Step 1. Preparation
You need a merchant account at Alipay Open Platform.
Before accessing the Alipay, there are some preparations that need to be done.
1.1 Get APPID
Login the Alipay Open Platform Console and create an application.
How to get the APPID : Alipay APPID Query Guide
1.2 Configure Cert
Generate an RSA2 certificate per the Alipay doc to obtain appPrivateKey.txt and appPublicKey.txt.
Upload the certificate to the application and download three files: alipayRootCert.crt, appCertPublicKey.crt, alipayCertPublicKey.crt.
Create a Cert named App Cert in Hanzo IAM:
| Hanzo IAM | Value |
|---|---|
| Type | Payment (x509) |
| Certificate | content of appCertPublicKey.crt |
| Private key | content of appPrivateKey.txt |

Create a Cert named Root Cert in Hanzo IAM:
| Hanzo IAM | Value |
|---|---|
| Type | Payment (x509) |
| Certificate | content of alipayCertPublicKey.crt |
| Private key | content of alipayRootCert.crt |

Step 2. Create an Alipay Payment provider
Next, create an Alipay Payment provider in Hanzo IAM by filling in the necessary information.
| Hanzo IAM | Value |
|---|---|
| Category | Payment |
| Type | Alipay |
| Client ID | APPID from step 1.1 |
| Cert | App Cert from step 1.2 |
| Root Cert | Root Cert from step 1.2 |

Step 3. Add the Alipay Pay Payment provider for your product
Finally, add the Alipay Payment provider for your product so that users can purchase the product using Alipay.
:::info Currency Requirement
Alipay only supports transactions in Chinese Yuan (CNY). When adding Alipay as a payment provider, ensure your product's currency is set to CNY. Products with other currencies will be rejected during creation or update to prevent payment failures.
:::

How is this guide?
Last updated on