#pilly_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ 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/1413583491379237057
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
I can't see any way to stop customers adding duplicate cards.
Seems like I'd need to add the payment method to the customer on Stripe, wait for the webhook, compare the fingerprint in our database to any other saved cards, if its a match, remove the card on Stripe?
Stripe doesn't de-duplicate the payment methods saved onto the Customer. This should be managed by your side.
You can use deferred intent flow to create a ConfirmationToken preview the fingerprint of the card on payment_method_preview parameter: https://docs.stripe.com/payments/build-a-two-step-confirmation#create-ct
If the fingerprint doesn't exist on the customer's saved payment method list, then create Setup Intent to save the ConfirmationToken to the customer: https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup
thanks
No problem! Happy to help ๐
Should the fingerprint be available in the payment_method_preview?
It should have a fingerprint: https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-card-fingerprint
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Could you share the confirmation token ID ctoken_123?
ctoken_1S44MJPaVXh0sZieCxvT4v46
I can see the fingerprint if I retrieve it, but it doesn't look like its returned in the confirmationToken.payment_method_preview from stripe.createConfirmationToken()
Yes, this is expected. Stripe doesn't show fingerprint at the client side
fingerprint will only be available when retrieving at server side
gotcha, thanks!
No problem! Happy to help ๐