#yilber_api
1 messages · Page 1 of 1 (latest)
đź‘‹ 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.
- yilber_api, 5 hours ago, 4 messages
I use the CardCvcElement,
CardExpiryElement,
CardNumberElement from react stripe
And you're using these values to create a PaymentMethod? https://docs.stripe.com/js/payment_methods/create_payment_method_elements
yes
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
But is a fingerprint created before creating the payment method?
No, the fingerprint only exists once the PaymentMethod is created
Will the card number being added have the same fingerprint as an existing card with the same number?
Yes
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?
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
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?