Soon afterwards, Waldron went to the Dunedin Casino where he withdrew $4000 cash. He then withdrew $800 cash from a nearby ATM, giving him a total of $4800 cash.
The withdrawals were made before the payments were reversed by ANZ so the loss lay with Kiwibank, Mr Evans said.
Waldron told police he did not know about the scam and was "surprised" to find the $5000 in his account. He withdrew the money and used a small amount to play at the casino, the rest being used to pay off debt.
Counsel Sarah Saunderson-Warner said Waldron had not been involved in setting up the scam. It had been set up by someone he did not know.
But when he checked his account and found the extra money there, he withdrew it to pay off debts.
Other people's accounts had also been used and other people were facing charges, she told the court.