Stripe.js 2 Error "Cannot read property 'confirmCardPayment' of undefined"

Hi there,

I can’t really understand why I get that error when processing payments using Stripe.js 2.

In my marketplace app, buyers can add payment methods in two places, either in their account settings or at checkout (two different pages). In both cases, I use “Create payment method with StripeElement A”.

When a StripeElement Payment Method is created, I attach it to the current user (that I registered as customer) and create a new data type “Card” retrieving the Payment method brand, last 4 and ID.

At checkout, I let the user select the preferred payment method with a drop down that picks from Current User’s userCards, a list of Cards.

Then, when a “Pay Now” button is clicked:

  • First, I “Retrieve a PaymentMethod”, setting the path: “Dropdown Select Payment Method’s value’s Stripe ID” (which starts with pm_)
  • Then, I create a Payment Intent passing the Current User Stripe’s ID and “Result of Step 1’s ID” as payment method
  • Lastly, I start payment with a new Stripe Element ( Stripe Element B, that I put on the checkout page, invisible and Disabled), passing “Result of Step 2’s Client Secret”.

When I run it with a test card, I get the following Bubble error message:
image

However, in Stripe I see that the payment intent has succeeded and that the payment is correctly recorded under the customer, together with the correct payment method (the one selected in the dropdown).

What am I missing here? Why I can’t seem to make the Stripe Element B payment successful?

Thank you for your help. I’m new to bubble (joined in late Dec), and no coding skills :slight_smile:

Hi @antonio.verolino, did you ever figure this out? I’m having the same problem.
Thanks