#harinth-order-processing
1 messages · Page 1 of 1 (latest)
Hi there 👋 we don't have anything along the lines of client-side events, so if webhooks don't fit your flow then you'll need to build your own triggers for the rest of your flow.
But can I do paymentIntent request from the server side code as I understand that it will not do authentication at the time of filling and submit the form
Am I right?
Not sure I understand what you mean, there are several requests that occur during a Payment Intent's lifecycle.
Confirming client-side still triggers webhook events that would be sent to your endpoints.
I understand that, but my query is if I add payment Intent in server side, there is no scope of authentication right? Authentication can happen only through client side code right?
Correct, 3DS/SCA flows cannot be handled server-side as they require customer input.
Thats right
So what you are suggesting is creating invoice and sending mail should be done at the time of receiving webhook?
Yup, listening for payment_intent.succeeded events would be a good trigger. You usually want to avoid doing order processing client side in case your donor immediately closes their browser after hitting the donate button or they happen to lose service if working from a mobile device.
So when the client side code hit payment Intent succeed, the form has to be submitted and details can be stored in the server. Later, when payment_intent.succeeded event comes via webhook, I need to process those
Am I right?
I'm not exactly sure, this part is a little confusing to me:
So when the client side code hit payment Intent succeed,
When your client-side code confirms the payment, it will attempt to be processed. If it succeeds this will generate a payment_intent.succeeded event that will be sent to your endpoints, and that can be used to trigger the rest of your flow.
You can use the Stripe CLI to listen events while you go through your test flow to see what events are fired when:
https://stripe.com/docs/webhooks#webhook-endpoint-one
What about it?