What you are describing doesn't quite add up if you were represented by a capable Chapter 13 attorney. It is not uncommon for a mortgage company to refuse your initial payment if they don't realize you have filed Chapter 13, but that alone wouldn't have caused your Chapter 13 to have failed.
I would suggest contacting an experienced Chapter 13 attorney to review the particulars of your case to see if your circumstances will allow a viable Plan,
Hope this perspective helps!
The mortgage company will contact you when the home is "purchased back at the foreclosure sale" and give you the timeframe to be out of the home. You should contact the court to determine when the "sale date" is ... this is the date the foreclosure court will set to sell your home. Generally, you would have to be out 15 to 30 days from the sale date. However you should speak to the mortgage company before the sale date to find out when they want you out of the home. Hope this helps, good luck.
Legal disclaimer: This answer in no way creates an attorney-client relationship. The answer requires more facts to be determined before a complete and specific answer can be provided. Reader accepts the risk of relying on such an incomplete answer and waives any claims of damages for doing so. The reader should contact a qualified attorney in their state to discuss these issues further before any action is taken. Any action taken without advise and counsel of a qualified attorney is inadvisable.
"Cash for keys" could be negotiated with a mortgagee. A 3 year-long foreclosure process could permit a mortgagor to set aside some funds for reorganization when the home is ultimately sold. If unable to make the necessary chapter-13 payments to repay the arrearage, discuss with your counsel possible conversion of your case to chapter 7. A bankruptcy judge would likely defer non-bankruptcy-related mortgage disputes to her superior-court brethren; again local counsel could advise.
This answer (as well as our Web site) doesn’t address all facts & implications of the question; it’s general info, not legal advice to be relied upon; it creates no attorney-client relationship; it may be pertinent to CA only and certain facts may be relevant to the San Diego court only; it’s independent of other answers. Seek legal counsel before acting or refraining from bankruptcy/legal action.