Accept an Alipay payment
Learn how to accept Alipay payments, a digital wallet popular with customers from China.
Alipay is a single-use payment method where customers are required to authenticate their payment. Customers pay by redirecting from your website or app, authorize the payment through Alipay, then return to your website or app where you get immediate notification on whether the payment succeeded or failed.
Set up StripeClient-sideServer-side
First, you need a Stripe account. Register now.
Server-side 
This integration requires endpoints on your server that talk to the Stripe API. Use our official libraries for access to the Stripe API from your server:
Client-side 
The Stripe iOS SDK is open source, fully documented, and compatible with apps supporting iOS 13 or above.
Note
For details on the latest SDK release and past versions, see the Releases page on GitHub. To receive notifications when a new release is published, watch releases for the repository.
Configure the SDK with your Stripe publishable key on app start. This enables your app to make requests to the Stripe API.
Create a PaymentIntentServer-side
A PaymentIntent is an object that represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent
on your server and specify the amount to collect and a supported currency. If you have an existing Payment Intents integration, add alipay
to the list of payment method types.
Redirect to the Alipay WalletClient-side
Register a custom URL scheme for your app by going to the Info tab of your app target settings.

The Alipay app opens this URL to return to your app after the customer completes the payment. Forward the URL to the Stripe SDK in your UISceneDelegate
or UIApplicationDelegate
:
When the customer taps to pay with Alipay, confirm the PaymentIntent using STPPaymentHandler confirmPayment. This launches the Alipay app or displays a webview if the Alipay app isn’t installed.
Alipay opens the return URL with safepay/
as the host. For example, if your custom URL scheme is myapp
, your return URL must be myapp://safepay/
.
Supported currencies
You can create Alipay payments in the currencies that map to your country. The default local currency for Alipay is cny
and customers also see their purchase amount in cny
.
Currency | Country |
---|---|
cny | Any country |
aud | Australia |
cad | Canada |
eur | Austria, Belgium, Bulgaria, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Norway, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, Switzerland |
gbp | United Kingdom |
hkd | Hong Kong |
jpy | Japan |
myr | Malaysia |
nzd | New Zealand |
sgd | Singapore |
usd | United States |
If you have a bank account in another currency and would like to create an Alipay payment in that currency, you can contact support. Support for additional currencies is provided on a case-by-case basis.