#pilly_best-practices

1 messages ยท Page 1 of 1 (latest)

amber gateBOT
#

๐Ÿ‘‹ 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.

lyric socket
#

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?

stone cloak
#

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

Build an integration where you can render the Payment Element prior to creating a PaymentIntent or SetupIntent.

lyric socket
#

thanks

stone cloak
#

No problem! Happy to help ๐Ÿ˜„

lyric socket
#

Should the fingerprint be available in the payment_method_preview?

stone cloak
#

Could you share the confirmation token ID ctoken_123?

lyric socket
#

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()

stone cloak
#

Yes, this is expected. Stripe doesn't show fingerprint at the client side

#

fingerprint will only be available when retrieving at server side

lyric socket
#

gotcha, thanks!

stone cloak
#

No problem! Happy to help ๐Ÿ˜„