Did the U.S. pay $400 million in ransom?

The short answer is No.

On 1/17/16, the U.S. paid Iran $400 million of a $1.7 billion legal settlement for fighter jets ordered by Iran prior to Nov 1979, but never delivered. (Iran had been seeking $10 billion. $400 million was the deposit on the order. If the $400 million earned 4% interest over 37 years, the amount owed would be $1.7 billion.)

Also on 1/17/16, Iran released four U.S. hostages as part of the Iran nuclear deal.

Although the legal settlement and the nuclear deal were negotiated separately by two different teams, Iran timed the hostage release so that they could claim a connection between the two for domestic purposes.

http://www.vox.com/2016/8/4/ransom-iran-400-million

As usual, Donald Trump mangled the facts:

"they have a perfect tape. Done by obviously a government camera. And the tape is of the people taking the money off the plane, right? That means that, in order to embarrass us further, Iran sent us the tapes, right? It's a military tape.”

Later, Trump spokeswoman Hope Hicks confirmed the footage on which Trump based his statement was apparently taken in Geneva [not Iran]. No cash is shown in that footage.

http://abcnews.go.com/trumps-iranian-propaganda-video-concoction