TORONTO -- An Ontario man said an online banking mistake caused him almost a month and a half of aggravation.

“I was making a payment through my Scotiabank online banking and I paid it to the wrong account," said Fred Martin, who lives just south of Ottawa.

Martin was trying to pay his tax bill and meant to send money to Revenue Canada, but he clicked on the wrong payee and accidentally sent more than $2,664 to a MasterCard account with The Hudson’s Bay Company.

Fred’s wife Anne said it’s been frustrating trying to get the accidental payment sorted out.

“It's been five weeks now and you get on the phone for two hours with the bank, no exaggeration, and with the Bay too," Anne said. "You get off the phone and you are no further ahead then when you started."

Millions of Canadians use online banking everyday to pay their bills and send e-transfers without problems, but if you do make a mistake it can be difficult to rectify it, if you don’t catch the error the same day.

Fred said he realizes it was his mistake for clicking on the wrong payee in his online banking, but he can't believe there isn't some way to reverse the funds.

To make matters worse, the MasterCard account with Hudson's Bay was closed years ago, so it's not clear where the money went.

They were told their bank should send an authorized debit request to get the money back from the MasterCard account, but they said after more then a month nothing has worked.

“I feel awful. I feel terrible. I’ve even had a couple of sleepless nights you know. I made a big mistake and I feel terrible," said Fred.

CTV News reached out to the Hudson’s Bay Company and Scotiabank and they agreed to review Martin's case.

“We have contacted the customer and communicated our attempts to resolve this matter as quickly as possible," a spokesperson for Scotiabank told CTV News Toronto.

"We encourage customers to always carefully review the details of their online banking transactions, including ensuring that payee information is accurate when paying bills online as funds are transmitted directly to that payee when the transaction is processed. Scotiabank customers can reverse a bill payment before 8:30 pm ET on the same day they made it.”

A spokesperson for Hudson’s Bay Company told CTV News Toronto that, “As an update, MasterCard has processed the return and the funds are back in Mr. Martin’s account. This has now been resolved.”

The Martins contacted CTV News Toronto to say that after we got involved, they got their money back.

“It's been six weeks of frustration. We really did believe we were not going to see that money again, we really didn't so it’s a major relief,” said Anne .

Fred said he'll be more careful banking online in the future. 

If you make a mistake in your online banking contact your bank right away.