Mr Wray, a freelance computer programmer, and his wife, Sue Tandon, have a pounds 52,000 mortgage with the Halifax, on which they pay pounds 286 a month. This is due on the 31st of each month.
Ms Tandon, a teacher, has a Maxim account with the society, which she uses to pay in her wages each month and treats as an ordinary bank account. The couple's mortgage is paid from this account. She also uses a card to withdraw cash from Halifax hole-in-the- wall machines.
On Sunday, 29 May, a Bank Holiday weekend, the couple, from Stockport, Cheshire, visited one of the society's branches in London to take out pounds 30 in cash. They asked for a mini-statement from the machine.
Mr Wray said: 'It showed that the mortgage payment, due two days later, had already been taken from my wife's account. Her new balance reflected that fact.
'This could have left my wife, or both of us, without money and could have caused us a lot of embarrassment.'
A Halifax spokesman said: 'A direct debit with us is set up so that at the end of every day the system looks at what needs to be paid out at the end of the next processing day. Because Monday was a Bank Holiday, on the previous Saturday the system would say that there was a need to process the direct debit.'
Although no direct debit withdrawal took place until the Tuesday, the system 'ring-fenced' the money to be taken from the account on the Saturday night.
But the spokesman stressed that the money still remained in Ms Tandon's account until Tuesday and she continued to draw interest on it until then.
Ms Tandon was unconvinced: 'If the money was still mine I should have been allowed to spend it as I wished.
'The question of whether and how there will be enough in my account to meet the mortgage on the day it is due is for me to decide, not the building society.'
Write to Money Grouse, The Independent, 40 City Road, London, EC1Y 2DB. Please do not send SAEs or original documents as we cannot guarantee to deal with every letter personally.