Millions of dollars in donations to two charitable foundations associated with Hillary Clinton and Donald Trump may not meet the legal standard for charitable gifts, four tax law experts tell The Huffington Post.

Clinton and Trump command hundreds of thousands of dollars for their speeches and appearances. But not all of this money goes to them. Significant portions of it are directed to the charitable foundations bearing their names.

To qualify as true charitable gifts, donations made to the Donald J. Trump Foundation or the Bill, Hillary and Chelsea Clinton Foundation must come with no strings attached. As the Internal Revenue Service puts it, they must be made "out of detached and disinterested generosity."

But as HuffPost reported, many of the donors to Trump's private charitable foundation got something in return from the billionaire at the time they gave to his foundation. Similarly, the Clinton Foundation received millions of dollars in exchange for 16 speeches given by Hillary Clinton, according to a list released by the foundation.

Rich people like Clinton and Trump pay accountants and lawyers huge sums to prepare their taxes; it's likely that those people could offer justifications for how the candidates reported their income. But neither the Trump campaign nor Clinton's team would tell HuffPost how they assigned money to their foundations. The IRS will not discuss individual taxpayers. And the tax experts who spoke to HuffPost said they struggled to see how such large sums donated in conjunction with appearances could be considered anything but personal income.

Donations that are part of a quid pro quo, in which Trump or Clinton did something in return for the gift, are considered payment for services rendered and part of their income, according to the IRS rules. Such donations to a foundation must be reported as part of the candidates' taxable income.

In IRS speak, this is called the "fruit of the tree" doctrine, which says that an individual who earns income cannot transfer that income to a third party in order to avoid paying taxes on it. The person who earns the money must report it as his or her own gross income, even if the person doesn't directly receive the money.

Suppose, for example, that your neighbors offer to pay you to speak at their kid's school. You agree to do it and tell them that in lieu of payment, they should "give the money to PETA." (You hate fur in this hypothetical.) You never see the money because it goes to PETA. But to the IRS, it's still income that you earned and that you're obligated to include on your tax returns.

When you do something for someone, you get income. Alice Thomas, a law professor at Howard University

Hillary Clinton's tax returns and financial disclosures do not contain any mention of more than a quarter-million dollars that Goldman Sachs paid to the Clinton Foundation in exchange for a speech. Trump has not released his tax returns -- despite IRS assurances that he's perfectly free to do so -- so there's no telling yet whether he might have reported donations in lieu of appearance fees as part of his earnings.

There is no evidence that the Clinton Foundation or the Trump Foundation did anything improper, said Alice Thomas, an associate professor of law at Howard University and an expert on nonprofit tax law.

"This is an individual taxpayer issue," Thomas said. It's the individual who "exercises control over where [the money] goes," she emphasized. "I'm providing a service, but instead of giving me the check, I'm telling you to give it to the nonprofit."

From a tax law perspective, that kind of transaction is "pretty simple," Thomas said. "When you do something for someone, you get income."

Open For Business With Trump

According to tax experts, the Donald J. Trump Foundation's IRS reports do not resemble those of a typical private foundation. Unlike public charities, private foundations do not solicit donations from the general public; their funding typically comes from the members of one wealthy family. But tax returns filed by the Trump Foundation from 2001 to 2014 list dozens of non-familial donors, many of whom did business with Trump enterprises.

Over the past seven years, Donald Trump has directed more than $4 million to his foundation, but none of it came directly from the man himself.

In 2011, Comedy Central gave the foundation $400,000 -- money that the network told HuffPost it had given in exchange for Trump's appearance on Comedy Central's "Roast of Donald Trump." In 2013, as Trump was busy raising his political profile through frequent appearances on Fox News, the company gave the Trump Foundation $10,000. A spokeswoman for Fox News declined to discuss the gift.

Watch Comedy Central's "Roast of Donald Trump":

"The basic analysis is that these donations should be counted as income," said Roger Colinvaux, a professor of law and director of the Law and Public Policy Program at Catholic University of America in Washington, D.C.

"Under the law, you can't have a contribution if there's a quid pro quo," explained Nick Mirkay, a professor of law and associate dean for planning and initiatives at Creighton University School of Law in Omaha, Nebraska. "If Trump said, 'I will appear in exchange for you making a contribution,' then the money should have been reported on Trump's income tax returns."

But because Trump hasn't released his tax returns, there is no telling whether he reported this money.

Clinton's Millions

Hillary Clinton is connected to two major foundations, one of which has received money only from Clinton family members. The other is the Bill, Hillary and Chelsea Clinton Foundation. Commonly referred to as the Clinton Foundation, it's a public nonprofit with thousands of individual donors, and it collects the majority of its funding from the public at large.

When Hillary Clinton has requested donations in exchange for speeches, the money has gone to the public charity. The former secretary of state has earned millions for this larger foundation. According to the Clinton Foundation's website, "speeches by President, Secretary, and Chelsea Clinton have helped support the implementation of the Clinton Foundation's work."

Last year, the foundation released a list of nearly 100 speeches given by the three Clintons since 2002 (no specific dates were given). The list includes 16 speeches given by Hillary Clinton that brought in between $2.95 million and $6.25 million for the foundation. A foundation spokeswoman declined to offer any additional details about the speeches, but said that the list "gives the public an unprecedented level of transparency into the Foundation."

One company on the list is Goldman Sachs & Co., which gave the Clinton Foundation between $250,000 and $500,000 in exchange for a speech. The Wall Street bank also paid Clinton directly for speaking, including $675,000 in fees for three speeches in 2013.

See Clinton speaking at the Goldman Sachs "10,000 Women" Dinner:

No one with the Clinton campaign or the Clinton Foundation would explain why the fee for one Goldman Sachs speech was reported as part of the foundation's revenue and the fee for other Goldman Sachs speeches were reported as part of Clinton's personal income.

But individual taxpayers aren't supposed to pick and choose which earnings they classify as income and which they direct to a foundation, tax law experts told HuffPost. "Overall, there are only very narrow exceptions to one's ability to sign away or waive income," said Mirkay, of Creighton University. "Otherwise, people would do it all the time."

Looks Like Quid Pro Quo

Getting answers about donations that were made as payment for services is just as difficult with Trump's spokespeople as with Clinton's.

Mutually beneficial relationships between Trump and donors to his foundation can be traced back at least to 2005, the year Norwegian Cruise Lines paid the Trump Foundation $100,000 "in lieu of an appearance fee for Melania Trump," a spokeswoman for the cruise line told HuffPost. The Trump campaign declined to comment on whether his wife reported the money as income.

The following year, a couple from New Zealand gave the Trump Foundation $10,000 for a 30-minute meeting with The Donald. Phil and Corinna Jones, the owners of a get-rich-quick seminar business, were ecstatic about the get-together. "You just can't underestimate the value of this sort of one-on-one time with someone like Donald Trump," Phil Jones told reporters.

This isn't something that we mere mortals have to deal with. Nick Mirkay, a law professor at Creighton University

Some of the foundation's donors, including Comedy Central and Norwegian Cruise Lines, admitted giving to the foundation in lieu of paying appearance fees. But 18 other donors to the foundation (all of which appeared to benefit from relationships with Trump) declined to discuss why they donated or what sort of business they may have with him.

These include media companies like NBC, which aired Trump's reality show, "The Apprentice," and gave the foundation $500,000 in 2012, as well as tenants in Trump's buildings and companies that supply goods and services to his real estate holdings.

In 2007, the Trump Foundation collected $4 million from Vince McMahon, the owner of the WWE wrestling franchise. That was also the year that Trump appeared with McMahon on the WWE's signature broadcast, "Wrestlemania." McMahon gave another $1 million to the foundation in 2009, when Trump reprised his role on the show. A spokeswoman for WWE said the company paid Trump a separate appearance fee, but she wouldn't elaborate.

Watch Trump attack McMahon on "Wrestlemania":

Over the past four years, a New York-based ticket reseller named Richard Ebers has become the single biggest backer of the Trump Foundation, giving more than $1.8 million. Reached by phone, Ebers refused to say whether Trump had ever done anything in return for those donations.

But "if he's telling them, 'Pay the money to the foundation,' then that's clearly what we call an assignment of income," said Mirkay. "Under the law, you're treated as having accepted the income nonetheless."

An Exclusive Club

Trump's financial disclosure forms, which presidential candidates must file with the Federal Election Commission, list all the income he reported in 2014 but do not contain any mention of the money from Ebers. A spokeswoman for the Trump campaign declined to comment.

Likewise, Clinton's disclosure forms -- which span the last 15 years, covering her time as a senator, secretary of state and presidential candidate -- do not make any obvious mention of the money she earned for the Clinton Foundation in exchange for her speeches.

None of this necessarily means that Trump or Clinton has bilked taxpayers out of revenue. More information from both candidates' camps would be helpful.

The purpose of the relevant tax law, though, is to avoid a situation where a person takes income in the form of charitable gifts and then uses that money for his or her own benefit. In other words, let's imagine that a reporter named Christina makes a million dollars a year writing for The Huffington Post. But she tells HuffPost to send the money instead to the Christina Wilkie Foundation. While that foundation, in turn, gives a few thousand dollars a year to a veterans group, it also pays for Wilkie's travel, meals, a car and a phone. Effectively, Wilkie has avoided paying any taxes on her income, yet still has the money at her disposal.

Over the past several years, the Trump Foundation has boosted Trump's political career with donations to conservative groups (though it also gives money to mainstream charities). The two Clinton foundations spend much of their money on undeniably charitable pursuits, but they have also fueled the former president's globe-trotting lifestyle.

"It's a very rarified world we're talking about," Mirkay said, "the level at which you have a foundation and you're commanding these fees. This isn't something that we mere mortals have to deal with."

As Trump moves further along in the Republican nominating contest, his competitors and their campaign surrogates have urged the billionaire to release his complete tax returns. Every major-party presidential nominee since Jimmy Carter has made public at least two years of tax returns. The Clintons have released their tax returns for each year since Bill Clinton became Arkansas attorney general in 1977.

But Trump has not seemed eager to open his personal books. "I fight like hell to pay as little as possible [in taxes]," he told CBS last year. "I'm a businessman, and that's the way you're supposed to do it."