-
Notifications
You must be signed in to change notification settings - Fork 150
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
[BUG]: us_bank_account payment method does not work in webview #463
Comments
hey there @sir-captainmorgan21 I want to make sure I understand more about this before filing a feature request like you describe, so a few questions:
|
|
@brendanm-stripe I really encourage you watch those videos, and itll layout where it fails. I think that is important to rule out the confirm step |
Yep I watched them (thanks for recording!) but apologies for misunderstanding slightly the step of the failure on collect vs confirm. I'm going to try to repro myself but it might take some time. In the videos I noticed you used the OAuth test bank. Is that required for the issue to happen, or does it happen with the first test bank too? |
@brendanm-stripe |
@brendanm-stripe here is the repro: https://github.com/sir-captainmorgan21/stripe-ach-webview-repro NOTE: I did not do anything past just authenticating with a bank and select accounts, since the bug prevents you from getting past that point anyway. |
Just wanted to update here that I have been able to repro/confirm the behaviour described here and we're looking at options. Currently, I'd say that this flow is not fully supported and that you'd need to use either the mobile SDKs (with a bridge for ionic) or open in a native browser. It also looks like you've written in to get support on this so we'll continue to work with you there on potential workaround or solutions. |
@brendanm-stripe ok sounds good. I thought about contributing to the stripe capacitor plugin to add ACH support. The iOS package API does have an option for a return url for the collectBankAccountForSetup, so I'd imagine the backend API must support it. I'm wondering if stripe JS just needs to surface a return URL for the same function as well? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
What happened?
We are trying to accept ACH as a payment method for future payments. We are using setup intents to get this done. The app is a React app. The payment flow (or bank detail collection flow), works perfectly fine in the browser. However, when in a webview, it does not. When the user finishes authenticating with their bank, they are stuck in the browser and are not being brought back to the app.
I have been through the ringer with support with no help. I did notice that in the docs for iOS, the
collectBankAccountForSetup
method accepts a return url to bring the user back to the native app. However, the stripe-js version ofcollectBankAccountForSetup
does not. I think this is what is missing for this to work.I did quite a bit of debugging, and found that after authenticating, stripe ultamitely lands on this url: https://connections-auth.stripe.com/testmode/complete?state=bcsess_1NLWY1HmbQZtVN0XzHFxkziy&code=success
In the webview experience this tab just closes right away (which makes sense based on the logic which is pasted below)
This script looks like it assumes the whole flow is happening in browser (which is fair because it is a JS library we are using), however, webviews are very common (especially with ionic being popular). I think allowing for a return url would be a nice addition to the library. I have included some links to videos of both the browser and webview flows to give you an idea. It is not at the confirm stage like support keeps suggesting.
WEB BROWSER: https://www.loom.com/share/a10fb94e9c684432a73c20b790ad73a8?sid=3826cdfb-c8ef-4d46-b763-ec639252802d
NATIVE WEBVIEW: https://www.loom.com/share/594108eb69d242dc9e3fadd9ffe8bd0a?sid=350c7cbf-9bf8-4a0c-bf4b-2d8d6ac4c952
Environment
N/A
Reproduction
No response
The text was updated successfully, but these errors were encountered: