#Gizmo-webhooks
1 messages · Page 1 of 1 (latest)
Hi there! Have you seen info on using our CLI? https://stripe.com/docs/webhooks/test
Hi bismarck, thanks for this, I'll give it a try.
To be sure, is using the PaymentIntent and allowing the redirect and using the webhooks considered the best/most future proof/robust practice? I've been investigating ways to avoid the redirect and reliance on webhooks for the past few days, but now I'm wondering if I should just refactor/rebuild my application to work that way if it will be best.
Webhooks are absolutely the recommended route
You never know when a customer will pay but drop off before hitting the success redirect
Do you know how people typically handle it if the customer is supposed to be redirected to something after paying that they should only see once they've paid? i.e. what happens if you redirect the customer after paying but the webhook hasn't hit / updated the db yet?
Well that depends on the flow you are using and the payment method type. Assuming it is a card payment, for instance, then they should only get redirected upon a successful payment since it is synchronous.
This really is only an issue with asynch payment methods for whether you want to provision before knowing if the charge actually succeeds
Otherwise, the option is to use a combination
You use the success redirect to log data, but also have webhooks in case a customer falls off
Right, upon successful card payment the user would be redirected, but wouldn't I not be using the synchronous success notification to update the db, but instead waiting for the async webhook to update the db if I'm doing it correctly?
That all depends on your model
If you need the database updated synchronously for some reason, then you would use the redirect to update it and then have webhooks in place as a fallback
If your model can wait the ~1 minute for webhooks, then you just use that.
I see, thank you. Regarding the redirect, is it considered a bad practice to use the option to redirect only if necessary? It would make it easiest for me to just submit my form once there is a successful payment by disabling the redirect, but I don't want to do it if it's not the way Stripe is supposed to work.
Nope not bad practice at all. You really do only need it when necessary. But, to handle 3DS for instance, you may need to redirect.
Can you tell me when 3DS comes into play?
An issuer can require it at any time really.
Unless you are in Europe in which case it is required due to SCA regulations
But we are seeing it more and more in the US as well from issuers to prevent fraud.
So you really should be prepared to handle it.
Somebody mentioned to me previously that with the Payment Element 3DS would be handled for cards inline / before any redirect was necessary. Is that not necessarily the case?