#salim-bt_api
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/1389523772897230888
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- salim-bt_api, 5 days ago, 14 messages
๐ happy to help
Thanks , i use wallets too
so basically you should offer your customer a way to choose between their saved payment methods and choosing a new payment method
yes that what i have, and if they chose to a new payment method and they type the cards numbers that already saved, it will be attached too
the other important thing is to check the fingerprint of a payment method
so i will have 2 same cards
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
each payment method has a fingerprint that is unique for the same details on the same account
so in your case, the customer would create a new PaymentMethod but the new one would have the same fingerprint as the old one
will get error?
no
what you can do to prevent duplicate PaymentMethods is to use the deferred flow https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=subscription
and once you collect the PaymentMethod that your customer enters then you can check the fingerprint
and using the https://docs.stripe.com/api/payment_methods/customer_list API you can check whether this customer has a saved PM with the same 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.
if that's the case you can opt to use the saved PaymentMethod ID instead of using the created one
if you wish to use confirmation token it's even better because you can have that information https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-card-fingerprint before the PaymentMethod is ever created
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.