#ebellotpu6
1 messages · Page 1 of 1 (latest)
for example, look at this customer: https://dashboard.stripe.com/test/customers/cus_NnNnwTTPpRZrHj
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
the basic idea is to look at https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-fingerprint on the new PaymentMethod and compare to that value on existing PaymentMethods for the customer and abort the process if it's the same. Details depend on how exactly you integrate.
he have too many paymentmethods with the same card
but if I am using stripe js to crate the payment methods? I am using the stripe.confirmSetup()
you have to pass the pm_xxx ID of the PaymentMethod to a backend server and call https://stripe.com/docs/api/payment_methods/retrieve to be able to see the fingeprint, it's only returned when using a secret key on the backend.
So first I have to createpaymentmethod, then I have to pass it's id to my api, then have to check the fingerprints and finally if it is unique, then I can tell the front to confirm setup?
yep, that would work
And if exists any paymentmethod with the same fingerprint, I will delete the new one and return the paymentmethod that has already existed to use it in the confirmsetup?