How to not charge for failed payments on order forms

When using a Payment Plan in the new order forms, it is important to set AutoPay to “yes”, otherwise customers will not be charged for any of their installments.

However, this also means that if a customer tries to purchase a product on a payment plan but the card is declined, the system will still attempt to autocharge them when it is time for their next installment anyway.

This is like walking into a store, getting your card declined, and then 2 days later (after you fix whatever issue you had with your card) getting charged for the items.

What is the easiest way to fix this?