A homeless veteran who sued a New Jersey couple, claiming that he did not receive most of the $400,000 they had raised for him online, will get the money he is due, GoFundMe said Thursday evening.

The man, Johnny Bobbitt Jr., met the couple, Mark D’Amico and Kate McClure, when they were stranded on a road in Philadelphia in 2017 and he gave them $20. The couple posted the story online, and it inspired over 14,000 people to make donations to Mr. Bobbitt via GoFundMe.

But Mr. Bobbitt said that he received only $75,000 and that the couple spent the rest, including on a BMW. He sued the couple last month, and the police are investigating. The couple have disputed his allegations.

On Thursday evening, GoFundMe said that it would help to cover the costs, if necessary, to ensure that Mr. Bobbitt gets any donations that he has not already received.