The U.S. paid ransom to Iran
President Obama used the return of $400 million of Iranian funds to Iran as leverage to ensure the release of hostages being held by Iranians.
The return of Iranian money had already been agreed on, but it did create a leverage opportunity for America when arrangements were being made for the release of hostages. Obama was not straightforward in his initial explanation of what happened. That might sound like a euphemistic evasion of saying he lied, but the term "not straightforward" is, in this case, a more accurate description than "lie."
In any case, this return of Iranian funds to Iran was not ransom.
However, in 1985 and 1986, the U.S. government did pay ransom to Iran for, in part, the release of hostages being held by Hezbollah. Hezbollah, which received funding and training from Iran, held seven hostages in Lebanon.
The U.S. government sent arms to Iran (in violation of international sanctions) in exchange for the hostages and for funneling resources to anti-communist rebels in Nicaragua (in violation of a congressional prohibition of such support).
Revelation of the arrangement resulted in scandal. The government has since repudiated the action and claimed that the United States would, in the future, adhere to a policy of no ransom for hostages.
The partisan critics throwing stones at Obama on this issue live in a glass house.