Reputation: 1
I am trying to void a invoice associated with a Subscription in stripe. Below is the scenerio:
I want the invoice to be voided as if the customer comes back and updates his payment method stripe gives the customer the option to pay the invoice. If the customer pays the invoice this would clear the invoice however, the sbscription is still in the cancelled state. So, the customer might raise a dispute stating that he wanted to continue the subscription, however he paid for a canceled subscription. I would rather that the customer subscribes to a fresh subscription , since the previous subscription is already in cancelled state
Any Ideas? how to voide a invoice automatically Or Any other ways to look at solving the problem
i tried making the invoice uncollectable. However, even in this state the invoice can be paid by customer
Upvotes: 0
Views: 826
Reputation: 1938
The only terminal invoice status that will prevent payment is void
. An uncollectible
invoice can still be paid, as you note.
Voiding invoices on subscription cancellation cannot be enabled automatically. The only way is via the API. My recommendation:
customer.subscription.deleted
events, which fire on subscription cancellation.open
invoices for the cancelled subscription via the list endpoint, passing the subscription
and status
parameters.Upvotes: 1