#sergio-snchez_best-practices
1 messages ¡ Page 1 of 1 (latest)
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.
- sergio-snchez_best-practices, 19 hours ago, 13 messages
- sergio-snchez_unexpected, 4 days ago, 34 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1257639706909474897
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello
hi! not sure what you mean, the SetupIntent might move to requires_action if e.g. 3D Secure is required, and that is a descision of the issuing bank and regulations.
that is perfect, if the setup intent during the confirmation requires action and we need to redirect the user to provide additional info it is ok
the link you shared is also for PaymentIntents and not SetupIntents, but it's the same principle, 3D Secure can be required and you need to handle it on the frontend.
the issue is when later we want to create the payment intent based on the setup intent and we execute the charge, sometime we have seen that the payment intent requires_action, it breaks of process because then later we need to ask for addictional information again to the user, in the client
if we do that, to complete the charge, again we are in a situation where the operation of charge and update our stock are decoupled and we can not ensure consistency
is it a way where we can get all the required details from the user in the client and then go to the back logic to complete the charge based on our business logic and update the stock in the same operation?
in other words, is there any way to pass the 3d secure one time with the setup intent, and having everything ready to complete the charge later ensuring that no more actions are required from the user?
you should not be creating a PaymentIntent immediately after creating a SetupIntent. You'd just create the PaymentIntent directly unless you are saving the card to charge it hours/days later.
no, you can not guarantee that any payment will not require 3D Secure. Any payment can require it at any time.
then if we use payment intent, we can do this approach https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=payment but at the end of the documentation, it mentions that next step could be required during the confirmation, and this next step will need to be completed from the client, so again we are not able to ensure that we charge and we update our stock in the same process (backend process)
with that in mind, is there any way of using a payment intent, being able to execute the charge and the "update stock" in the same transaction/process?
you can't avoid the possibility of 3D Secure being required when you do the payment, you need to design your flow to allow that