Redirecting from an iframe back into Ionic

I am creating a shop website with ionic that utilities an external payment provider that works in the standard way (runs in an iframe and redirects you back to your original page, once payment is successful).

As Ionic runs the website locally you can’t just redirect back to a URL as each URL would be different. I would imagine I am not the first person to come across this problem.

How can I redirect from my payment provider that is inside an iframe inside my app back to one of my ionic states?