How to redirect back to app ionic 1 from an external payment gateway

I have an app where one could do a payment through an external payment gateway. The payment gateway is accessed through a form with a post method to the gateway’s action page. And when the payment has been made it would redirect to another URL (currently i set it at my website and receive all the form parameters through a Rest API). Question is how do I take the user back to my app? I tried to access the local files as the redirect URL but it didnt work.

Please help

Did you ever come up with a solution to this?