Open modal page for payment purpose

Hi,
I need to implement payment flow in my ionic 5 (cordova). I’m using checkout stripe flow.

  1. Ionic app open webview and Redirect user to stripe payment page
  2. User insert data payment
  3. Stripe redirect to my web domain (success of error page)
  4. I want to create button on success/error page and onclick close webwiew and pass result (ok/ko)

How I can implement this scenario?

Thanks