In an interview with Fox News on Wednesday, Mr. Trump — who could be heard in an audio recording released last month discussing with Mr. Cohen arrangements for the payment to be made to Ms. McDougal — said he had become aware of the payments only after they were made. He emphasized that the payments Mr. Cohen admitted to in his guilty plea did not come from campaign funds.

“My first question when I heard about it was, ‘Did they come out of the campaign?’” Mr. Trump said. “Because that could be a little dicey.”

In fact, payments from either Mr. Trump’s personal or corporate accounts could prompt campaign finance reporting requirements.

Ms. Sanders said the president had not lied about the payments when he initially said he did not know about them. She called it “a ridiculous allegation” and refused to say whether the White House stood by its denial of the affairs, saying, “We’ve addressed this a number of times.”

The president also repeated his assertion that Mr. Cohen pleaded guilty to crimes that were merely violations and compared that with the way former President Barack Obama was treated because of a campaign finance violation during the 2008 presidential race. He only had to pay a fine.

“He had a massive campaign violation, but he had a different attorney general, and they viewed it a lot differently,” Mr. Trump said of Mr. Obama, adding a jab at his own attorney general, Jeff Sessions.

Mr. Trump was referring to a Federal Election Commission finding in 2013 that during Mr. Obama’s 2008 campaign he did not file finance reports in a timely manner. Mr. Obama’s violation was a civil one, unlike the felonies Mr. Cohen admitted to on Tuesday — making a campaign donation above the legal limit and doing so, in Mr. Cohen’s words, “to keep an individual with information that would be harmful to the candidate and to the campaign from publicly disclosing this information.”