#johan_docs
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.
- johan_docs, 5 days ago, 33 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/1247476402094215198
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
๐ happy to help
in that case you can refer to https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment
instead of the direct flow
so that means once I collected the payment method I can essentially use the same endpoints we already have that creates and confirm the paymentIntent?
I'm not sure what you already have
we do something similar in this screenshot to what you shared. We first create the payment method in the client like this:
basically when you have a logic that you want to execute before you capture the method you have 3 options:
1- use manual capture https://docs.stripe.com/payments/place-a-hold-on-a-payment-method
2- use the deferred payment intent flow in that case you can refer to https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=payment
3- use the two step confirmation https://docs.stripe.com/payments/build-a-two-step-confirmation
and then once we have the payment method, we take the paymentMethod.id and attach it to the setup intent when creating it
why do you need a SetupIntent in this case?
sorry my bad I meant to say payment intent
we take the paymentMethod.id and attach it to the paymenIntent we create and confirm in the server. we get the result in the same call, if it's successful we fulfil the order straightaway in the same call too
the preferable way is to still confirm it on the frontend though
because of SCA
you shouldn't capture the money until you're sure that you can reserve the place
so what needs to happen in your own logic is to out the reservation on hold from your side once you collect the payment method
and then once you confirm you confirm the reservation with webhooks
I understand, does this approach still needs webhooks or I can do this server confirmation just in the paymentIntent?
you can do server side confirmation
but if the PI requires_action for 3DS
you would still need to pass the PI to the frontend and do a frontend side confirmation
that's why I suggested not going with the server-side confirmation
yeah exactly we also handle SCA and send the pi back to the client, once the user confirms it the order gets fulfilled
we have some validations to prevent charging customers when the class is fully booked
There used to be one approach that you guys had in the docs to use the same endpoint but I can't find it anymore. we use that approach to implement it that way and it works really well
do you have idea if that is possible to do as well?
okay thanks a lot for your help! have a great day