#mandalorianiv_best-practices

1 messages ¡ Page 1 of 1 (latest)

sturdy larkBOT
#

👋 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/1220014463810535514

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

proper magnetBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

low grove
proper magnetBOT
low grove
#

hello, are you there?

sly trench
proper magnetBOT
low grove
#

But stripe's native sdk confirms the payment

#

lemme explain

#

I create a payment intent via backend and returns me payment info and payment methods if available.

#

then if I want to save a card for future usage, I set save_future_payment parameter "off_session" and it attaches the payment method to customer

#

I can not check it cause there is no fingerprint when I want to compare

#

cause fingerprint is being created after payment is confirmed

#

@sly trench ?

hard cedar
#

Hanzo had to step out, I am catching up here

#

And right, unfortunately it isn't possible to prevent these duplicates before the payment but you can prune your saved payment methods to avoid duplicates after

low grove
#

hmm

#

so it's like I need to check after the payment and if it duplicates, I need to remove

#

and I have to compare with fingerprints

hard cedar
#

Yes, deleting duplicates after would be the way to go here
(I know you deleted that message but I am also not sure why I used that verb either)

low grove
#

hahaha

#

prune, never heard of it and I'm not native in english haha

#

where are u from

low grove
#

when I completed a payment, fingerprint must have created so I can compare?

hard cedar
#

Exactly

#

Webhook events would be a great way to do this. I forget if the fingerprint data is immediately available but you can look it up

#

Actually you can use payment_method.attached which will have the fingerprint in it

low grove
#

hmm got it

#

But I'm not sure that I can retrieve customer's attached cards in webhooks event

#

worst case, backend can check duplicates in create payment api request

#

you guys are trusting webhooks too much

hard cedar
#

You can, but you won't need to if you listen to the payment method event

low grove
#

so fingerprint are best way to do it

#

so I need to ask, this dublication is actually a bug for you or you have a specific reason for that

#

?

hard cedar
#

It is expected behavior. We create a new PM for whatever data is passed in to us, we don't check for preexisting payment methods with the same data, so it is expected that a new card would be created here

low grove
#

so if you say like "this payment method is already saved", thiefs may validates stolen cards

#

OK thx man