#zleb

1 messages ยท Page 1 of 1 (latest)

orchid cliffBOT
lucid berry
#

Hi ๐Ÿ‘‹ currently there is no prebuilt functionality for avoiding creating Payment Methods with the same information, you will need to add custom logic to remove one of the duplicate Payment Methods to avoid that.

If the type of Payment Method being used offers a fingerprint value, such as cards, this can be used to identify duplicates. When a new Payment Method is created you can check the Customer's other Payment Methods to see if any of those have the same fingerprint, and then remove one of the duplicates if so.
https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-fingerprint

hidden spruce
#

is there any way to know which card was added later, so that will be the one i will delete?

#

oh i think the payment method are different, only fingerprint is the same, right?

#

so right now no choice but to delete..

lucid berry
#

Correct, distinct Payment Methods will be created, which will have matching values in their respective card.fingerprint fields.