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!
2 Answers
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.
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.