'How to force Stripe subscription charge

Does anybody know how I can force renewal (charge) subscription in Stripe? For example, we have 'past-due' subscription, and 3 tries to charge at this 'past-due' period. Customer adds new payment source (credit card), and wants to use it immediately. But next charge in 'past-due' schedule will be performed in few days. How we can call charge (create invoice and pay it) immediately? Any ideas extremely appreciated!



Solution 1:[1]

I executed this API call: https://stripe.com/docs/api/invoices/pay

And was able to get the invoice to process payment, even though I was unable to via the web console.

Solution 2:[2]

Unfortunately, you cannot. You'd need to either create a one-off charge using the stored payment source and customer-argument; or you could take the amount owed, add it as a new invoice item to the customer record, then subsequently create an invoice.

Finally, you should close and forgive all of the previous invoices, so they don't prevent you from making more and remove them from the past-due status.

Another thing I might recommend is actually changing the retry logic in your dashboard. There are actually three options. If you set the logic to "do nothing" after the third attempt, it won't mark the invoice as unpaid, but it will close it. So it'll end up making your life a lot easier when they add a new payment method. You'll just have to be mindful of when people miss payments.

Solution 3:[3]

This can be done in the UI via Payments > Invoices Then click Retry Charge enter image description here

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 sobelito
Solution 2 korben
Solution 3 olive_tree