Legally, if you were overpaid--which includes paying you money during a time when you should not have been paid--you have to return it. That said, the company cannot unilaterally (without your consent) take a percentage OR force you to work for free; if you and they cannot work out a payment arrangement, their only legal option is to sue you for the money--though they would also be well within their rights to fire you "for cause" (which means no unemployment benefits) for refusing to return company money to which you are entitled. Therefore, it is very much in your interest to try to work out a mutually agreeable payment plan with them.