#yilber_api

1 messages · Page 1 of 1 (latest)

neat muralBOT
#

đź‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1310725026495856652

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

full galleon
#

Hi there

#

Can you provide more context? How are you collecting the new card?

twin hull
#

I use the CardCvcElement,
CardExpiryElement,
CardNumberElement from react stripe

full galleon
twin hull
#

yes

full galleon
#

Got it. In that case, you should inspect the PaymentMethod server side and look at its fingerprint, then use this to compare with existing cards

twin hull
#

But is a fingerprint created before creating the payment method?

full galleon
#

No, the fingerprint only exists once the PaymentMethod is created

twin hull
#

Will the card number being added have the same fingerprint as an existing card with the same number?

full galleon
#

Yes

twin hull
#

But I still don’t fully understand. Should I add the card first and then compare? Wouldn’t that cause duplication, which is what I want to avoid?

full galleon
#

You'll need to create the PaymentMethod first before you can review the fingerprint. Creating the PaymentMethod doesn't mean you have to attach it to a customer. You should be able to compare the fingerprint of the newly-created PM with the fingerprints you have for the existing PMs then decide whether to prompt the customer for a new PM

twin hull
#

So, the payment method I just created isn’t stored anywhere if I don’t link it to a customer? Or should I perform some kind of deletion?

full galleon
#

It's on your account but can only be used once: for a single payment or to attach it to a customer. If you don't attach it to a customer, it can still be used for a payment

#

There's no way to delete a PaymentMethod but you can just ignore it/not use it