I'm implementing Stripe integration in Ionic 5 app.
I'm calling redirectToCheckout method from '@stripe/stripe-js'. It opens checkout process in external browser. Everything is fine, but I need back user to app when checkout will be finished.
How can I do that?
How to setup success_url, to make it redirect to native app from browser?
You need to set up a custom URL scheme in your Ionic app (like my-app://
) and then redirect to that URL after Checkout is complete.
Note that Stripe Checkout Sessions require success_url
to be a valid internet-routable URL, so you'll need to point success_url
to a page on your server that in turn redirects to your app's custom URL scheme.