#dominikganic_unexpected
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/1349663557851156480
๐ 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.
- dominikganic_best-practices, 20 hours ago, 31 messages
- dominikganic_unexpected, 22 hours ago, 33 messages
- dominikganic_best-practices, 1 day ago, 29 messages
- dominikganic_unexpected, 2 days ago, 13 messages
Here you can see all the payment methods I've retrieved from Stripe. There are duplicates. 2x each same credit card? ๐
Customer ID: cus_RuzJQRqNSLIu8n
Even the fingerprint of the payment method is exactly the same but it's listed as duplicate.
Hi, let me help you with this.
This is expected behavior. If you're saving PaymentMethods for future use, next time you can to suggest the customer to use the saved PaymentMethod, before letting them add a new one. Otherwise, nothing prevents them from creating a new PaymentMethod with the same card number.
Okay. I already offer in this screen my customer to take any payment method* he has already added.
Also, now Payment Element supports this natively: https://docs.stripe.com/payments/save-customer-payment-methods
I mean, saving the payment method in his profile is fine and user friendly
But I have to handle duplicates, each method has a finger print, I could whenever I load the payment methods out of his profile lookup if there is any same method and delete / detach duplicates right?
If it's important to you to remove card PaymentMethods with the same number, you can check the fingerprint yourself, and detach the PM via API: https://docs.stripe.com/api/payment_methods/detach
Yes that works only with cards as I've seen now.. damn
I think Bank Accounts also have fingerprints which correspond to the account number: https://docs.stripe.com/api/payment_methods/object#payment_method_object-us_bank_account-fingerprint
I mean that's really weird, why Stripe even allows to duplicate the same payment methods in a customers profile.
I have to find a solution to get rid of this.. The customer can for sure take any saved payment method, but what if not?
Then it will duplicate it anyways, even though I've provided him his saved methods, he might be "dumb" enough to type in everything again.. hm.
To support as many use cases as possible, Stripe API can't be too restrictive. A PaymentMethod with the same number can have a different billing address, expiry date, metadata etc.
Ah I understand
That makes sense yes.
Hm okay, then I have to find another workaround here, I'll compare cards and filter them in my backend when delivering to frontend. ๐
You can limit the number of saved PaymentMethods per Customer, and check it before allowing them to add a new one.
Yes, might be good as well. Thanks for reaching out! Have a nice day ๐