#Mathieu Ducrot-invoice
1 messages · Page 1 of 1 (latest)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
basically payment_succeeded is only sent if there was an actual payment of money within Stripe for the invoice
.paid is sent if the invoice moves to the paid status(including if e.g it was paid out of band, or the invoice total was $0 so no actual payment was required, etc) , so it's generally better and we intend for it to replace the older payment_succeeded event.
ok so if i got you right there should always be a invoice.paid event trigger on the invoice workflow when invoice.payment_succeeded has been trigger.
And so it's a better practice to listen on that event for webhook, especially if you intend to depreacte the invoice.payment_succeeded event ?
yep
.paid is sent anytime payment_succeeded is ,but also when the invoice is paid in other ways as mentioned above
we have to add a new event type instead of changing the semantics of the existing one , for backwards compatibility
sure i understand
one final question about checking those event with subscription.
When a subscription is being created, is it better to check only the latest_invoice.status being paid (verified by invoice.paid) or do i need to also check the payment_intent.status (with payment_intent.succeeded event) ?
I would just look at the invoice status