Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe re-direct not closing the in app browser in flutter IOS #2082

Open
YogeshSha0304 opened this issue Feb 20, 2025 · 6 comments
Open

Stripe re-direct not closing the in app browser in flutter IOS #2082

YogeshSha0304 opened this issue Feb 20, 2025 · 6 comments
Labels
Awaiting response Awaiting response from the issuer needs triage Needs triage

Comments

@YogeshSha0304
Copy link

YogeshSha0304 commented Feb 20, 2025

Describe the bug
I'm testing out more payment methods for Stripe following. This was not working in my existing app which is using flutter_stripe: ^11.4.0 version the in app browser was never getting closed.

To Reproduce
Steps to reproduce the behavior:

Open react native app using Stripe
Open the payment sheet
Click on any one of the payment methods
The in-app browser will open, authorise the payment
In-app browser doesn't close

Expected behavior
In-app browser should close and return to the payment sheet with correct status

Image

Smartphone (please complete the following information):

Device: iPhone 16 Pro
OS: iOS 18.2
Browser: stock browser, safari
Version: flutter_stripe: ^11.4.0
Additional context
If I manually close the in-app browser the Stripe payment displays the status correctly.

@YogeshSha0304 YogeshSha0304 added the needs triage Needs triage label Feb 20, 2025
@remonh87
Copy link
Member

I would recommend taking a look at: #462 in essence you need to make sure that you specify a return url and also enable the deeplink in flutter.

@remonh87 remonh87 added the Awaiting response Awaiting response from the issuer label Feb 23, 2025
@YogeshSha0304
Copy link
Author

Yes, I understand that point, but if my deep link URL isn’t working, then how is the same code working on Android?

@FabrizioBilleciUNICT
Copy link

@YogeshSha0304

Yes, I understand that point, but if my deep link URL isn’t working, then how is the same code working on Android?

Android does not require a returnUrl to works. It's only for iOS
https://docs.stripe.com/payments/accept-a-payment?platform=react-native#react-native-set-up-return-url

@YogeshSha0304
Copy link
Author

I verified that the deep link is working and the console logs appear in the terminal, but the dialog box isn’t automatically closing. It should pop the screen when the deep link is triggered or i have to write some code to close the stripe sheet.

@donalexo
Copy link

I have exactly the same issue. The deep link is handled in the app after finishing the payment but the browser stays open. After pressing "Close" the browser closes and the page which was linked to before becomes visible.

@remonh87
Copy link
Member

So 2 things can be causing this:

  • Make sure to have the correct scheme provided in the config: example

  • Make sure that the redirect url is specified and you can handle the redirect by gorouter to launch another screen: example

The behavior of the screens is out of our jurisdiction since they are native rendered and we will not make changes to them because of PCI compliance. Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting response Awaiting response from the issuer needs triage Needs triage
Projects
None yet
Development

No branches or pull requests

4 participants