I am using Stripe for the payment gateway and Subscription model. And sometimes, I am confusing with charge.failed and invoice.payment_failed.
Hope to hear the difference between charge.failed vs invoice.payment_failed.
Thanks in advance!
I am using Stripe for the payment gateway and Subscription model. And sometimes, I am confusing with charge.failed and invoice.payment_failed.
Hope to hear the difference between charge.failed vs invoice.payment_failed.
Thanks in advance!
A Charge is a more general abstraction that represents a payment. An Invoice has an underlying PaymentIntent, which has one or more Charges under it. You can listen to the failed events any of those, depending on what you want to track (all charges vs. only those from invoices, for example).