WeChat Pay
Use WeChat Pay as a payment provider in Hanzo IAM.
You need a WeChat Merchant account. See preparation before access.
Get credentials
API Key v3
In WeChat Merchant Platform: Account Settings → API Security → Set APIv3 Secret. Copy the API Key v3. See APIv3 Key Settings.

Merchant certificate
Account Settings → API Security → API Certificate → download the certificate. Get the Certificate Serial Number and Private Key. In Hanzo IAM, create a Cert and fill in the certificate details.

Merchant ID and App ID
Create the provider in Hanzo IAM
Add a Payment provider, set Type to WeChat Pay, and fill in:
| Hanzo IAM field | Value |
|---|---|
| Client ID | Merchant ID |
| Client secret | API Key v3 |
| App ID | App ID |
| Cert | The Cert above |

JSAPI payment (in-WeChat browser)
Hanzo IAM supports JSAPI and Native payment. For JSAPI (payment inside the WeChat app), configure a WeChat OAuth provider that uses the WeChat Media Platform. The Client ID 2 of that WeChat OAuth provider must match the App ID of this WeChat Pay provider.

After users sign in via WeChat (e.g. in the WeChat in-app browser), they can pay with WeChat Pay via JSAPI.
How is this guide?
Last updated on
