I am just updating this thread with my research as there is very little information out there on using Apple Pay with Ionic and this may help someone.
I am using Ionic 5 / Capacitor / Stripe.
I am still in the researching phase so have not figured out how to do it from within the mobile app yet.
1. Preferred solution - by far the easiest - Does not work
https://stripe.com/docs/stripe-js/elements/payment-request-button
Issue:
However this may not work from inside an ionic app as requests from an iFrame or inAppBrowser are blocked by Stripe as Ionic uses a local urlScheme of capacitor:// not https://
https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites
Possible workaround using Stripe V1:
Possible workaround?:
Capacitor - build cross platform apps with the web.
Change the local urlScheme to ionic://
Looks like this may not work:
Serve Ionic 5 Cordova application over HTTPS - Stack Overflow
bug: Setting iosScheme to http has no effect · Issue #2173 · ionic-team/capacitor · GitHub
Other possible workarounds:
Note: This does work from a web page outside of the ionic app. But if you do that you need to redirect back to the app using deeplinks from a web page. Not ideal and may not pass app store policy as payment is outside the app.
2. Capacitor community Stripe plugin (supports apple pay) - Have not tried
This looks like the most viable option.
3. Capacitor Apple Pay plugin - Have not tried
Still in development and only a few downloads, high risk
4. Cordova Apple Pay plugin - Does not work with latest iOS
This has not been updated in over 2 years and does not support later than iOS 12.
5. Ionic Apple Pay Enterprise
To expensive and not ready yet.