#Empress Brosephine
1 messages ยท Page 1 of 1 (latest)
๐
So you are specifically asking about collecting new PaymentMethods, correct?
And you don't want a Customer to have multiple PaymentMethods attached?
And how are you collecting these new PaymentMethods? What integration flow?
essentially, we want the user the ability to modify their payment method via a HubSpot card. Which operates off of using the Cardelement
so we loop over the form data, use the data to update customer details if needed, then we delete the existing card & then we add in the new card via confirmCardSetup
Got it
So yeah I think the flow sounds fine. The only thing is that as you noted you likely want to add the new card first before deleting the existing card in case the new card is declined on SetUp
yeah
I didn't know you could have multiple payment methods tho so thats good to know
Yep, very common to allow customers to have multiple paymentmethods attached and then show them a UI of their attached paymentmethods for future payments when they return to your site
sweeeeet
quick question although I can look it up myself:
can you look up the payment methods in stripe via the card element so we don't have to expose the full card number?
That sentence doesn't quite make sense. Do you mean, can you retrieve the PaymentMethods attached to a Customer from the client? Or can you explain what you mean?
sure, I think I answered my question thinking more about it; I just wasn't sure if it's worth going through the process if someone enters the same exact card in again , but I guess it doesn't really matter
Yeah I mean that is up to you. You look at the fingerprint to determine whether it is a duplicate card or not
sweeeet didnt know that either. thanks so much bismarck
This is what I mean by fingerprint: https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-fingerprint
Yep happy to help