#harinth-order-processing

1 messages · Page 1 of 1 (latest)

burnt willow
#

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.

dusky orchid
#

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?

burnt willow
#

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.

dusky orchid
#

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?

burnt willow
#

Correct, 3DS/SCA flows cannot be handled server-side as they require customer input.

dusky orchid
#

Thats right

#

So what you are suggesting is creating invoice and sending mail should be done at the time of receiving webhook?

burnt willow
#

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.

dusky orchid
#

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?

burnt willow
#

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

dusky orchid
#

I am asking about line number 71

burnt willow
#

What about it?

dusky orchid
#

Her it will check the payment Intent status to show the user whether it is a success

#

This is stripe code