#usefuldm
1 messages · Page 1 of 1 (latest)
Can you explain what result you're trying to achieve?
Or, what is happening now that's not what you expect?
I want to avoid the duplication of the same credit card
If i insert the same credit Number, CVC , exp data
What control i should do?
There is no automatic de-duplication
If you want to prevent this, you can examine the card.fingerprint on the payment method object:
https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-fingerprint
This will be the same for identical cards
And then you can decide if one should be detached from the customer or not, or how to proceed in your app
Okay so, through the card.fingerprint i can avoid this case in my application
Exactly, if you spot a duplicate you get to decide what to do with it
Can i control the older card.fingerprint with the new card.fingerprint and if are the same, avoid or prevent this situation?
What do you mean control?
You don't know the fingerprint until the card is collected, so all you can do is react when you see it
Okay through the webhook
The correct mean Is compare two value
Compare(older.card.fingerprint, new.card.fingerprint )
If are the same, avoid the case
Sure, yes, when it is attached to the customer or you otherwise have access to the payment methd details you can compare those fingerprints and detach or return an error to the customer as you need
No problem, happy to help!
But Is the same for PayPal method?
No, paypal has a payer_id instead: https://stripe.com/docs/api/payment_methods/object#payment_method_object-paypal-payer_id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay, thanks