'How to prevent the users from paying failed invoice in the Stripe customer portal

I use Stripe subscriptions and I configured the retry mechanism for failed payment, so I don't really see a reason to allow the customer to manually pay a failed invoice in the customer portal.

I saw there's an option to disable the Invoice History which would effectivement prevent that, but I'd like to keep this history.

So, is there a way to prevent the customers to manually pay an invoice in the Stripe Customer Portal?



Solution 1:[1]

If you are not expecting to take payment on these Invoices in future, you can void them. Voiding an Invoice will close it and prevent the user from paying it in future.

https://stripe.com/docs/invoicing/overview#void

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pompey