Deductions & credits

I'm surprised someone else didn't answer this yet.  It's a bit complicated, you have some different options and you may need to test different situations.  I'll try and get a detailed answer later today.

The other thing is, when are you quitting and making the payment?  For example, if you are quitting in 2018 and also paying back in 2018, they may just reduce your 2018 income on your W-2.  You may need to ask HR.