Washington (CNN) President Donald Trump is shifting his story about the Stormy Daniels controversy following the revelation by his lawyer, Rudy Giuliani, that the President reimbursed a payment to the adult film actress by Michael Cohen.

Trump -- who previously said he was not aware of the $130,000 Cohen paid to Daniels before the 2016 election in an effort to keep her quiet about an alleged affair between her and the President -- denied on Thursday that any campaign money was used to reimburse Cohen and said he was paid via retainer. The payment has prompted complaints to the Justice Department and Federal Election Commission over potential violations of campaign finance law.

"Mr. Cohen, an attorney, received a monthly retainer, not from the campaign and having nothing to do with the campaign, from which he entered into, through reimbursement, a private contract between two parties, known as a non-disclosure agreement, or NDA," Trump wrote on Twitter Thursday morning.

"These agreements are very common among celebrities and people of wealth," Trump continued. "In this case it is in full force and effect and will be used in Arbitration for damages against Ms. Clifford (Daniels). The agreement was used to stop the false and extortionist accusations made by her about an affair despite already having signed a detailed letter admitting that there was no affair. "

He added, "Prior to its violation by Ms. Clifford and her attorney, this was a private agreement. Money from the campaign, or campaign contributions, played no roll in this transaction."

Mr. Cohen, an attorney, received a monthly retainer, not from the campaign and having nothing to do with the campaign, from which he entered into, through reimbursement, a private contract between two parties, known as a non-disclosure agreement, or NDA. These agreements are.....

...very common among celebrities and people of wealth. In this case it is in full force and effect and will be used in Arbitration for damages against Ms. Clifford (Daniels). The agreement was used to stop the false and extortionist accusations made by her about an affair,......

...despite already having signed a detailed letter admitting that there was no affair. Prior to its violation by Ms. Clifford and her attorney, this was a private agreement. Money from the campaign, or campaign contributions, played no roll in this transaction.

Cohen had admitted to paying Daniels, whose real name is Stephanie Clifford, out of his own pocket through a private LLC. Daniels has sued Trump and Cohen, saying the nondisclosure agreement is void because Trump did not sign it.

The White House has said Trump denies the alleged affair.

Legal implications

Giuliani said on "Fox & Friends" Thursday morning that Cohen attempted to make the Daniels controversy "go away" with the payment -- a suggestion that the agreement was intended to help Trump's election chances.

Upon hearing that comment Thursday morning, CNN chief legal analyst Jeffrey Toobin referred to it as a "confession that this is a campaign finance violation because they wanted to shut her up in October of 2016."

Toobin also said the penalty for violating campaign finance laws "depends on the level of intent. Most FEC, Federal Election Commission, violations are handled civilly. But if it's willful, if it's intentional, it can be handled criminally."

Michael Avenatti, a lawyer for Daniels, told CNN's "New Day" on Thursday that he was "speechless" and "stunned" after hearing Giuliani's revelation about the reimbursement. He suggested that there would be a violation of campaign finance laws if Trump and Cohen structured the payment "in a way to avoid detection or in an effort to make it appear to be something that it was not, namely, a retainer payment as opposed to $130,000 reimbursement, that may involve money laundering depending on how it was handled."

"There also may be tax issues relating to the deductibility of those expenses," he continued. "If they were deducted as legal expenses for tax purposes when in reality it had nothing to do with legal services rendered but instead was the reimbursement of the $130,000, that, too, is going to be a problem."

In an interview on CNN's "The Lead with Jake Tapper," Avenatti said he believed Giuliani was trying to get in front of the information inevitably coming out.

"I absolutely believe that," Avenatti said. "I believe that this was an attempt by Giuliani to hang a lantern on this and to disclose it on terms that he believed to be friendly to the President and friendly to him."

But Bradley Smith, a former FEC chairman, told CNN that he doesn't believe the payment constitutes a campaign finance violation.

"I don't think it matters whether Trump paid Cohen back or not," Smith said, adding, "The standard is not: If it's related to the campaign, it's a campaign expenditure. The standard is: It's a campaign expenditure if it is an obligation that would not exist were it not for the campaign."

JUST WATCHED Toobin: Trump team lying about Stormy hush money Replay More Videos ... MUST WATCH Toobin: Trump team lying about Stormy hush money 02:32

Giuliani says Cohen, Trump did not discuss payment during election

Giuliani went into further detail in another interview Thursday morning about the extent to which the President was involved with the transaction, suggesting on Fox Business Network that Cohen did not communicate with Trump about the payment at the time he made it to Daniels and that Trump later reimbursed the money after the presidential election was over.

"The money was paid by Michael Cohen in October of 2016. Of course he didn't talk to the presidential candidate then because the man wouldn't have even remembered. I wouldn't remember if you talked to me then. I was with him 24 hours a day," Giuliani said.

"After it was over, there was the opportunity to reimburse," he added, saying, "the President reimbursed him out of non-campaign, non-campaign contribution money, private money, his money, and he did it over a course of 2017. It was mixed in with a couple of other things that have nothing to do with them or anybody else, just things that a lawyer would take care of for his client."

But Giuliani also suggested that Trump may have forgotten about the transaction at some point.

"How many times do you have to go back to your checkbook to see, you know, you forget," he said. "Did I make that contribution, didn't I make it, was it $2,000, $5,000, did I take it from this account or that account?"

He went on to say, "If you have to speak off the cuff, you're going to say, 'well, I did it from here, I did it from there.' Now we have the records, we can see exactly what it was. Now they should drop this."

Shifting explanations

This week's revelations have, at a minimum, deepened a political controversy for Trump as explanations over the Daniels controversy continue to evolve.

Just weeks before the 2016 election, Cohen created a private LLC to pay Daniels following an alleged July 2006 encounter with Trump, The Wall Street Journal reported in January.

In February, Cohen said in a statement that he used his own "personal funds" to facilitate the payment to Daniels.

"Neither the Trump Organization nor the Trump campaign was a party to the transaction with Ms. Clifford, and neither reimbursed me for the payment, either directly or indirectly," Cohen said at the time.

But Giuliani contradicted that statement on Thursday, telling "Fox & Friends" that Cohen was "definitely reimbursed." He added that he believed Cohen was "trying to help" the Trump family and doing his job as a lawyer.

Trump said last month that he didn't know about the payment and deferred questions about the matter to Cohen. Giuliani told "Fox & Friends" that Trump learned the details about the payment "10 days ago."

The President has since distanced himself from Cohen, who was formerly a top confidant, telling Fox News last week that Cohen had overseen "a tiny, tiny little fraction" of his legal work.