Recently my employer payed me a market salary adjustment. I thought it might be an error so I contacted HR. HR assured me it was my money and I was entitled to it. Now they are telling me it was in fact an error and I have to pay it back. Since I have proof in writing of them telling me it is my money am I required by law to pay it back? Are they allowed to deduct from my paychecks until it’s paid back? I made financial decisions with the money based on their information which are now going to very negatively effect me.
am I required by law to pay it back? Are they allowed to deduct from my paychecks until it’s paid back?
It is hard to tell, but based on your description I am inclined to answer "no".
At first glance, HR's mistaken confirmation seems unlikely to override your contract (be it explicit or implicit) with the employer. Furthermore, one might allege that if the roles were reversed (meaning that the employer paid you less than the compensation you two agreed upon), you would be entitled to the corresponding correction.
On the other hand, the circumstances might be such that the employer simply changed his mind and now calling it an "error" is merely a pretext: Your inquiry with HR might have prompted the employer to revisit the matter and conclude that "maybe I need not make adjustments that my employee does not even expect".
That being said, you did the right thing by inquiring with HR. First, because it reflects your honesty and good faith (which are essential in contract law). And second, because HR's prior assurance may be tantamount to "bear[ing] the risk of a mistake". See the Restatement (Second) of Contracts at § 153-154.
The fact that you already committed to financial (?) obligations elsewhere suggests that the employer's rectification did not happen overnight. The longer the employer's delay, the lesser his merit in taking back the salary adjustment.
Even if the employer were entitled to a reimbursement, you would be entitled to restitution for any cognizable detriments that resulted from your reasonable reliance on HR's explicit assurance. See the Restatement at § 376.
The extra money from that particular check is yours because it meets the legal requirements for a gift: donative intent, delivery and acceptance. They clearly did confirm that the money is intended for you, they delivered and you accepted. Because a gift cannot be taken back, they cannot claim the money.
Now, there is certainly another consideration as to whether you should stand your ground and not give the money back — your relationship with your employer: even if you legally are entitled to the money, you may wish to forfeit it to keep your job. But this is out of the scope of this site.
With regards to whether you are entitled to the same adjustment on any future pay checks — this depends on the wording of your contract, specifically whether there are any explicit or implied provisions for pay rises and whether the adjustment can be construed as a pay rise. If it can, then again — you are entitled to have this adjustment applied to any future pay checks as the employer cannot cut your salary without your approval. And, again, whether you should actually stand this ground depends on whether you are brave enough to challenge your employer.