#Olivia Wen
1 messages · Page 1 of 1 (latest)
You listen to the checkout.session.completed webhook event. It will come for every successful payment
No that won't. You can just listen to it for all successful payment and ignore the rest
For webhook here is a good starting Doc https://stripe.com/docs/webhooks
So how do I achieve an effect like dashboard. Our business needs to know the status of each order payment
Sure, then you can listen to payment_intent.succeed and payment_intent.failed instead. Keep in mind that those events could contains non-Checkout transactions too
Is listening to these events also by way of the documentation?https://stripe.com/docs/webhooks
I see in this link that there is a payment status. Can I use this to indicate whether the payment was successful or not?
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hello, are you still there?
That's a bit different. Basically when you receive checkout.session.completed that's already a successful payment
Will there be any disadvantages if I use it?
You won't catch the "real" failed payment_intent as you mentioned in Dashboard
real?what means?
I mean if you listening to checkout.session.completed, you will only receive it when a successful payment came. This is good in most case. But since you mentioned you want to have both succeeded and failed payments as the Dashboard, this checkout.session.completed would not suit your need
If I want success and failure, is it appropriate to determine that by the payment_status in this link?
no
That's the only way, isn't it?
Yep