We handle this exact problem for lots of SaaS products, start-ups, and other companies at
http://churnbuster.io/ . After a few failed re-attempts over a few days, we begin a drip campaign of notifications where we email them every few days with a sequence of different emails until they update their payment information or cancel their account. If the emails don't produce a response and we've got their phone number on file, we'll also try to ring them up on the phone (we have a real person to do this) and send them a follow-up email for whatever the outcome of the phone call was (e.g. customer wants to update online, we left a voicemail, it was the wrong number, etc. etc.) Some companies will have the majority of their success with just the emails, but we have customers where the success rate is split is 50/50 for emails and phone calls. Either way,
everyone benefits from the phone calls enough to justify doing it (or in our case paying us to do it.)
As for the "not signed in for months" part, I recommend you not assume someone wants to cancel their account just because they haven't signed into the service in months and their payment information randomly goes bad. Let them tell you this. Depending on the service you provide, people may use it seasonally, but pay each month for you to keep their data on hand. (I've used Basecamp this way before, although now they let you pause your account for up to 6 months.) Sometimes people use services that are "set it and forget it" where the user doesn't actually need to sign into the service to receive value from it. The absolute worst would be for a customer of any type of service to have their account closed for non-payment with no notice whatsoever.
That's really just the tip of the iceberg for thoughts that we've got on this subject, so feel free to reply or email me at andrew@churnbuster.io if you've got any other questions.