What they did is illegal: 1) as long as you were making the payments, they had to honor the contract, too--by ignoring the terms of the repayment agreement, they breached the contract; 2) even if you had not been honoring the contract and so you owed them money (if you failed to make payments, generally the whole remaining amount would come due at once), the law is very clear that an employer may not take or withhold employee pay with either employee consent (agreement) or a court order (like for wage garnishment). While you still owe them whatever you do under the terms of the contract, you could sue them for the final paycheck and any other costs or losses you suffered (like if you had any NSF or overdraft fees) due to their action.