#harinth-pi-sync-action
1 messages · Page 1 of 1 (latest)
Hey there! Generally this is not recommended as there's no guarantee your customers don't exist the payment flow before you can carry out any synchronous action
Why not use webhooks? Events are sent pretty quickly
Suppose I have a form, and user enters card details and submit. We will do payment Intent via javascript. Upon successful payment, we will redirect user to a success page, by sending a mail to the user as payment is successful. This is the scenario. Webhook won't work here right?
Yeah, webhook is definitely the recommended option here: https://stripe.com/docs/payments/handling-payment-events
There's no guarantee at all that your customer doesn't close the browser before they're sent to the success page/URL and your email is never sent
What if I am not giving return_url in that case?
Will it show success message at the same area where payment form comes?
Hi! I'm taking over ynnoj
Ok
Where do you see the return_url?
Return url we set when using javascript paymentIntent function
I guess return url is not mandatory
Are you talking about the return_url in the stripe.confirmPayment() function? https://stripe.com/docs/js/payment_intents/confirm_payment
Absolutely no issues, I was just trying to understand better your question
Sorry for the delay. Yes, the return_url is required when calling stripe.confirmPayment()