Alipay integration: native Alipay checkout for your SaaS
Accept payments from customers in China with native Alipay in ShipAny — RSA2-signed web checkout, verified async notifications and automatic credit grants.
Last updated: Oct 8, 2026
If many of your customers are in mainland China, a native Alipay merchant account gives them the checkout they trust. ShipAny includes a native Alipay provider alongside Stripe and Creem, so you can sell in RMB without a third-party gateway.
What ShipAny handles
- Web checkout via
alipay.trade.page.pay, signed with your RSA2 private key. - Async notifications at
/api/payment/notify/alipay, verified with the Alipay public key. ShipAny replies with the plain-textsuccessAlipay expects, so notifications aren't retried forever. - Order queries (
alipay.trade.query) as a fallback when the user returns before the notification arrives. - Credits and orders: a paid notification marks the order paid and grants credits in one transaction.
- A test amount in fen (分), so you can pay ¥0.01 end to end before launch.
Native Alipay is used for one-time payments (credit packs, lifetime plans). For recurring billing, use Stripe or Creem.
Setup
- Create an app on the Alipay Open Platform and enable the computer website payment product.
- Generate an RSA2 key pair, upload the public key to Alipay, and copy the Alipay public key Alipay gives you back.
- In ShipAny, open Admin → Settings → Payment → Alipay: switch on Enable Alipay, then fill in the App ID, your RSA2 private key, the Alipay public key, and the notify URL
https://<your-domain>/api/payment/notify/alipay. - Optionally set a test amount of
1(¥0.01), make a purchase, then clear it before going live.
Tips
- Use the Alipay public key, not your app public key, for verification — mixing them up is the most common reason notifications fail.
- The notify URL must be public HTTPS on the domain that actually serves your app.
- Selling internationally too? Stripe can offer Alipay as a payment method for one-time payments with no separate Alipay contract.
