#tailoris
1 messages · Page 1 of 1 (latest)
Hello! Generally you need to handle that yourself somehow.
I see.. I read on stackoverflow that stripe returns some kind of fingerprint that is a unique identifier for that specific card. However, I am using a checkout.session for handling the subscription start. So I cannot really check the card fingerprint before that. Do you have maybe some kind of suggestion how I could handle this?
You can use the fingerprint to tell if a card matches one that's already been used, but as you said you can't check until after the fact when using Checkout. If you want to check beforehand you'd need to not use Checkout and instead build a custom payment form on your own website using a guide like this one: https://docs.stripe.com/payments/build-a-two-step-confirmation
awesome, thank you for your help
No problem!
just one additional question
when the user checks out, I assume stripe returns some object where this fingerprint can be found right?
Yep, it'll be on the Payment Method. For card Payment Methods it's here, for example: https://docs.stripe.com/api/payment_methods/object#payment_method_object-card-fingerprint
so basically, the checkout flow would be like this right?
user creates payment method, then clicks checkout and that's when the subscription starts
You mean if you built a custom one?
yup
Yes, that's basically it at a high level. After the Payment Method is created you can check the fingerprint to see if it matches a fingerprint that's already been used, and if it has you can show an error instead of creating the Subscription.
alright, I think I got it 😁