@namechanged707 - I feel really bad for you; I probably would have landed myself in the same situation - I would have known it was a payroll error, but I'm on a really tight budget and usually once the money is gone, it's gone. I don't have a credit card and have no one we could borrow money from, I'm just used to knowing that I have got (for example) £80 left and 2 weeks till payday, so I eke it out, and we manage. But even though I would have known that the money would have to be paid back, I simply don't have the willpower to not spend it, when it's just sitting there. The payroll office would have been closed cos it was Christmas and if this had happened at any other time of year, I know if it was me I would have had to have been straight on the phone, paying it back that same day, or the temptation to bury my head in the sand and ‘fritter’ it away (just on ‘normal day to day stuff’) and worry about the consequences later would have been too great. So, like I say, I really feel for you; I didn't want you to feel like you're the only person in the whole of MN world who is distinctly lacking in common sense/is perhaps 'morally questionable' in this instance/missing any trace of willpower/could do with a grown up to look after the finances!
Anyway, I work in HR and I used to oversee recovery of overpayments for the Payroll Department of the (very large) organisation. The amounts owed ranged from £50 to (in one very strange case, where we had managed to continue to pay the employee for nearly two years after she had left) £75,000 (which makes your overpayment seem much easier to deal with)! On the odd occasion, an employee would spot the error before us, or we would notice within a few days of payday and they'd be in a financial position to repay the full amount immediately. However, in the vast majority of cases, we agreed a repayment plan with the employee and deductions were made from their wages over a set period, or if they had left the organisation, they would often send us a series of post-dated cheques, which we would bank as the months rolled by (this was about 10 years ago, you’d probably set up a standing order these days!).
Most organisations will be happy to agree a repayment plan with you (in my experience, only very small employers won't - often because they can't afford to, or at least can't afford to set the precedent), particularly as overpaying you was their error and it was you who brought it to their attention.
I have my fingers crossed for you OP, I really hope that they're understanding and help you to rectify it with the minimum of worry for you. Good luck!