Reputation: 51
I have a subscription whose collection_method
has been set to send_invoice
.
I can't figure out the correct webhook event when the invoice for the subscription is sent to the customer each month but the customer didn't pay it or the payment made by the customer failed.
I think it is invoice.payment_failed
but I am not sure whether that applies when the customer doesn't pay the invoice situation too.
Can anyone help me out here?
Upvotes: 0
Views: 1441
Reputation: 7459
The invoice.payment_failed
is the right one to indicate a payment failure, but the case of customer not paying the invoice is a bit different. It depends on your settings to handle the invoice and/or subscription after payment failures or time past due.
If you choose to have the invoices marked uncollectible, you get the invoice.marked_uncollectible
event. If there is a related subscription and you chose to modify it, you'd receive a customer.subscription.updated
event (ref) with the new status
.
Upvotes: 2