#hemal_webhooks
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1326807478171598869
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
I'd recommend checking the guide here: https://docs.stripe.com/checkout/fulfillment
More specifically, you should listen to all checkout.session.* events
If the payment is successful, checkout.session.completed event will be sent for synchronous payment method and checkout.session.async_payment_succeeded event for asynchronous payment method
Okay so I just need to listen checkout.session.completed for the successful payments? and what about payment fail event?
Checkout Session allows customer to retry payment until he/she succeeds. Prior to the successful payments, Stripe doesn't send failed events for Checkout Session related events
Is there any reason why you would like to subscribe to payment failure event?
I just want to keep a track of that, because I need to create a weekly payouts to connected account
If it's only for papertrail / logging purpose, you can listen to payment_intent.payment_failed event for any failed payment attempts
but I want to use stripe's hosted payment flow, which is only available in checkout session right? and I guess payment_intent method don't supports the stripe hosted payment
Checkout Session uses Payment Intent under the hood. Failed payment attempts on the Checkout Session will send payment_intent.payment_failed event. I'd recommend testing this out using declined test cards: https://docs.stripe.com/testing#declined-payments
Okay let me check
I am getting the payment_intent.payment_failed event, In Case of failures.
so, I will get the success event payment_intent.succeeded on the successful payment right?
Yes, that's right!