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

Web PaymentElement to support SetupIntent #1939

Open
clintdoriot opened this issue Sep 25, 2024 · 0 comments
Open

Web PaymentElement to support SetupIntent #1939

clintdoriot opened this issue Sep 25, 2024 · 0 comments
Labels

Comments

@clintdoriot
Copy link

Is your feature request related to a problem? (please describe)

I'm trying to use the PaymentElement on web to allow users to set up their payment method (CC, Apple, Google) in advance. I can generate the setup intent using my server API, and pass the client secret into the PaymentElement.

However, the only option I'm seeing to submit the PaymentElement is WebStripe.instance.confirmPaymentElement(), which assumes it has a payment intent instead of a setup intent. Submitting that results in the error:

IntegrationError: Your code called confirmPayment() but you passed a client_secret associated with a SetupIntent. Did you mean to call confirmSetup() instead?

Describe the solution you'd like
I would like to be able to setup the PaymentElement with a SetupIntent, and be able to trigger the confirmSetup function

@clintdoriot clintdoriot added the needs triage Needs triage label Sep 25, 2024
@remonh87 remonh87 added web and removed needs triage Needs triage labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants