#harinth-pi-duplicate-pm
1 messages ยท Page 1 of 1 (latest)
Hello ๐
We don't de-duplicate payment methods. That is something you'd have to handle on your end.
Can you clarify what you mean by this?
What method I need to follow in Hosted payment page where saved cards are not showing?
I have a page where customers enters card details every time. It's like a shopping cart but makes payment with out registration
It's an open page
There will be a key for that form to use internally. Customer gives his card details and personal details and submit.
Same customer gives same card details every time
In that situation, when I use paymentIntent, it creates payment method one by one on each transaction
Oh okay! I see.
What are you using to accept the card information?
Are you using any stripe elements like card element?
Yes using stripe element
But suppose same customer makes multiple payment with the same card, it creates multiple paymentIntents and eventually multiple payment methods
I feel its not a good practice
Yeah but that's how its supposed to work though unless you create a customer object and check if the payment method already exists
Is there any issue with this?
If I am not giving customer ID along with payment Intent request, then it can be avoided?
Can you clarify what you mean by,
If I am not giving customer ID along with payment Intent request, then it can be avoided?
Feel free to use an example
If I am giving customer ID in payment Intent, the payment method will get attached to the customer
Right?
Suppose the card 4242 is already attached to a customer cus_xxx. Next time when the customer gives the card details, at which point, I can check whether this card exist?
Hi
Still here ๐
Juggling between a few threads at the moment
Ok๐
ah yeah you could do that
You can compare the fingerprint of the cards (saved card and the one that user is putting in) and check if its the same card
https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-fingerprint
we can create payment Intent without customer and after its success, we need to catch the webhook and match the fingerprint with what we have in db. If not matches, we can attach customer and save that card in db
Am I correct?
Hi ๐ I'm stepping in for @olive finch . Give me a minute to catch up
Hi
So for this payment page on your site, you don't want to keep track of customers. Is that right?