PayPal wrote to a woman who had died of cancer saying her death had breached its rules and that it might take legal action as a consequence.
The firm has since acknowledged that the letter was "insensitive", apologised to her widower, and begun an inquiry into how it came to be sent.
The matter came to light after her bereaved husband contacted the BBC.
He said he wanted to make other organisations aware how distressing automated messages could be.
Lindsay Durdle died on 31 May aged 37.
She had been first diagnosed with breast cancer about a year-and-a-half earlier. The disease had later spread to her lungs and brain.
PayPal was informed of Mrs Durdle's death three weeks ago by her husband Howard Durdle.
He provided the online payments service with copies of her death certificate, her will and his ID, as requested.
He has now received a letter addressed in her name, sent to his home in Bucklebury, West Berkshire.
It was headlined: "Important: You should read this notice carefully."
It said that Mrs Durdle owed the company about £3,200 and went on to say: "You are in breach of condition 15.4(c) of your agreement with PayPal Credit as we have received notice that you are deceased... this breach is not capable of remedy."
PayPal has told Mr Durdle that it is looking into this "as a priority", and has written off the debt in the meantime.
"We apologise to Mr Durdle for the distress this letter has caused," a spokesman added.
"We are urgently looking into this matter, and are in direct contact with Mr Durdle to support him."
Mr Durdle said a member of PayPal's staff had told him there were three possible explanations:
- a bug
- a bad letter template
- human error
He added that he had been assured that whatever the cause, it would be addressed, although PayPal had told him it would not be able to share the information because it was an "internal matter".
"I'm in a reasonable place at the moment - I've got quite a level head on my shoulders - and am quite capable of dealing with paperwork like this," Mr Durdle said.
"But I'm a member of the charity Widowed and Young, and I've seen first-hand in there how a letter like this or something like it can completely derail somebody.
"If I'm going to make any fuss about this at all, it's to make sure that PayPal - or any other organisation that might do this kind of insensitive thing - recognises the damage they can cause the recently bereaved."