#sergio-snchez_best-practices

1 messages ¡ Page 1 of 1 (latest)

warm hornetBOT
frigid elkBOT
#

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.

warm hornetBOT
#

👋 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.

jovial cypress
#

Hello

nimble hawk
#

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.

jovial cypress
#

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

nimble hawk
#

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.

jovial cypress
#

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?

nimble hawk
nimble hawk
jovial cypress
#

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)

Build an integration where you render the Payment Element before you create a PaymentIntent or SetupIntent, then confirm the Intent from your server.

#

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?

nimble hawk
#

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

jovial cypress
#

understood

#

ok thanks for the context, we will think about it about how to resolve that in a proper way