#geekcorner_best-practices

1 messages · Page 1 of 1 (latest)

proud sparrowBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1271185338957566015

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

obsidian meteorBOT
left trail
#

Hi 👋 fingerprint is the right value to use for that. It's not tied to a Customer object, and can be used to identify if multiple customers are using the same card.

Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
https://docs.stripe.com/api/payment_methods/object#payment_method_object-card-fingerprint

formal shard
#

What is dingbot? 😭

left trail
#

Our bot

formal shard
#

Anyways, thanks for the fast response

left trail
#

This is tricky with Checkout, since you would need details of the Payment Method before you try to process the payment, and Checkout doesn't really give you the opportunity to do that.

formal shard
#

Oh, we don't plan to use Checkout

#

It would be Elements instead

left trail
formal shard
#

Oh! That looks really good!

left trail
#

The Confirmation Token you'll get there will give you a preview of the Payment Method that will be created. You can inspect that preview for the details you care about, so you know whether to proceed with creating your subscription/payment or if you should ask for new card details.
https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-card-fingerprint
https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-card-funding

formal shard
#

That's nice.

#

What if the users would pay with something else, let's say PayPal, or Cash App, how would I fingerprint? Or is it recommended to only use card in that case?

left trail
#

You can't fingerprint across payment method types like that. PayPal and Cash App are abstracted payment methods, they don't give you visibility into the funding source used for you to deduplicate. If you need to avoid duplication, I'd stick to cards and maybe bank accounts.

formal shard
#

Alright!

#

Thanks for your help, it is much appreciated.

left trail
#

Any time!

formal shard
#

Actually the thing that confused me was this:

The fingerprint is unique for a given Account. If the same card is added to two different accounts, they will have different fingerprints. Cards and bank accounts created by Platforms on behalf of Connected Accounts will have a fingerprint that is universal across all Connected Accounts.
- https://support.stripe.com/questions/how-can-i-detect-duplicate-cards-or-bank-accounts

#

So we're talking about Stripe accounts, not Customers accounts right?

left trail
#

Correct, "customer accounts" aren't a thing in Stripe. We have Customer objects, but the "account" being referred to there is the Stripe account being used.

#

So the same card on two separate Stripe accounts will have different fingerprints.

#

But the same card on two different Customers in the same Stripe account will result in you seeing the same fingerprint value for each Payment Method.