#borys-void-invoice

1 messages · Page 1 of 1 (latest)

native kayak
topaz gale
#

unfortunately no, it brings another issue, especially for cardless trials, invoice fails because there is no payment method, and subscription gets cancelled but invoice stays in this pending state, after a year customer comes back and buys new subscription, but at the moment when customer adds payment method for new subscription, the old failed invoice gets charged too

native kayak
#

I see. So you can programmatically mark Invoice as void after a Subscription is cancelled

topaz gale
#

right yea i was just wondering if there is a configuration maybe somewhere for that

hollow dew
#

I also have this exact use case. We ended up hiding the invoices from the user with the initial Invoice metadata.

native kayak
#

Going back to your original question:

is there a way to configure a subscription so that when it gets canceled all associated open invoices are marked as "void"?
Yes. You would just listen for the customer.subscription.updated webhook Event and check if status == canceled on the Subscription, then set the Invoice status to void