Question: 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?

Answer: 
You need to [set up a custom URL scheme in your Ionic app](https://ionicframework.com/docs/native/deeplinks/) (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.
You can use <https://ionicframework.com/docs/native/in-app-browser> to open stripe checkout page so that checkout page will open in InApp browser and after subscription creation you can emit value using socket.io and after getting emmitted value close your InApp browser.