Even if you do everything possible to document that this is actually paid off. A court could decide in the future that whoever made the error and is suing you for that loan payment money back is justified to receive their money back from you since the payment schedule recorded will show you stopped paying and someone else paid it off even if they did so in error. Put that 5k in an interest bearing account and don't spend it. Document the fact that you did so for the exact reason that you knew that someday the court would decide against you and you would owe the money. The judge will see you are wise and honest and not require you to pay extra for fraud.