#jtishler

1 messages ยท Page 1 of 1 (latest)

vernal orioleBOT
somber flame
#

Hi there. One moment

#

So our Payment Element doesn't display previously saved cards. One thing you could do is have your own UI section that displays previously saved payment methods for the customer. Then, they could select the payment method they want to use for the subscription and you could create a subscription object on the backend, passing that payment method: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method

#

But it's up to you

#

Whatever works best for your flow

opal light
#

what if the existing payment method requires 3DS?

#

would we need to deal with that again or no?

somber flame
#

Yeah it's possible

#

Your flow will need to be able to handle that

opal light
#

can you explain how you would recommend handling that?

#

we were looking at the option of passing payment method info manually to the confirm functions

#

not sure if thats on the right trakc

#

*track

somber flame
#

Yeah you can do it that way for sure

opal light
#

is there a way to use the general confirmPayment and set the payment method manually

#

we saw how to do it for the specific ones like confirmCardPayment etc

#

but the documentation for the general one was a little less clear

somber flame
#

confirmPayment doesn't allow you to pass the payment method id

opal light
#

what is the manual data referred to here then? "Use stripe.confirmPayment to confirm a PaymentIntent using data collected by the Payment Element, or with manually provided data via confirmParams. "

#

we really want to confirm on the client to more easily handle 3DS and such

somber flame
#

Where do you see that?

somber flame
opal light
#

sorry for the delay, had to hop into a meeting

#

not sure why we're seeing different things here

weary wing
#

@opal light hello, can you catch me up on what the question is? codename had to step away

opal light
#

hi yes thanks!

#

the question is about giving users the option to pay with an existing payment method

#

we are migrating to use the payment element in our subscription purchase flow to support 3DS

#

and we are trying to figure out how the flow should handle using a saved payment method

#

codename explained that the payment element doesnt handle this

#

and we were discussing the different stripe.js library functions that can help us confirm a payment intent clientside using an existing payment method id (or other info)

#

specifically we were diving into the difference between the generic confirmPayment function and the ones that are specific to payment method type

#

but also if this is the wrong track on how to approach the initial problem, happy to hear other thoughts!

weary wing
#

๐Ÿ‘€

#

gotcha so what you want is

#
stripe
  .confirmCardPayment('pi_123_secret_345', {
    payment_method: pm_123existing
  })
  .then(function(result) {
    // Handle result.error or result.paymentIntent
  });
opal light
#

we are going to have different payment methods in the future

#

so we were wondering if theres a way to not have to decide which specific payment method function to use

weary wing
#

it wasn't built that way unfortunately, the functions were designed so that each new PaymentMethod type explicitly goes through a different method on Stripe.js

opal light
#

okay gotcha

#

thanks for your help!

weary wing
#

no problem!