You think all your Christmases have come at once. You go to your ATM to withdraw $20 and it gives you $200. Which isn't bad as you only have $25 in your account.

So, can you keep it? After all, you did nothing wrong. It was the bank's ATM that made the mistake.

Wrong! The only confusion in the law about this is whether you will be charged with fraud or with theft.

The legal quandary goes back to the 1980s when ATMs were still relatively new and went berserk, pouring out cash when they were offline. One case went all the way to the High Court. The judges ruled for the banks – the only question was which crime applied. The judges, in their wisdom, determined an ATM is not a human so it can't give consent to handing over the extra dosh. That ruled out fraud as ATMs have no minds and so can't be fooled. Therefore keeping the cash was stealing.

But as Law Professor Alex Steel wrote in The Sydney Morning Herald, it's possible you might even be charged with both fraud and theft. The law in NSW considers it fraud to make an ATM do something the person is not authorised to make it do. You can be charged with fraud for deceiving a machine.

There certainly is fraud going on with ATMs. Increasingly people are being charged with fraud and theft for using skimming machines to get access to unwitting customers' accounts and pinching their money.

In Perth recently 19 bank customers were charged for allegedly taking advantage of a software glitch to steal $217,000 from the bank. They'd discovered times when the ATMs could not check how much was in their account due to maintenance, and they kept on withdrawing way beyond their balance.

Police said the offence was clear. If you don't have money in your account, it's not yours to take. It is stealing and carries a maximum penalty of seven years in jail.

But welfare groups complain banks sometimes use heavy-handed tactics to get money back when ATMs give customers more money than they have in their accounts. Welfare recipients found their accounts frozen or closed as the bank demanded cash be returned. Banks usually give customers 10 days to repay the overpayments before they start sending rude letters demanding the money back.

But Santa is around if you get overpaid at work. Under Fair Work laws an employee usually has to agree to repaying it, or the employer has to get a court order.

The content of this article is intended to provide a general guide to the subject matter. Specialist advice should be sought about your specific circumstances.