Skip to content

Web PaymentElement to support SetupIntent #1939

@clintdoriot

Description

@clintdoriot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions