Except If Hand To Hand —
Narrated Omar bin Al-Khattab: Allah’s Messenger, peace be upon him, said, “The bartering of gold for gold, is Riba (usury), except if it is from hand to hand and equal in amount. Wheat grain for wheat grain is Riba except if it is from hand to hand and equal in amount. Dates for dates is Riba except if it is from hand to hand and equal in amount. Barley for barley is Riba except if it is from hand to hand and equal in amount.”
[3: 344- O.B. Sahih Al-Bukhari)

Of Unequal Quality —
Narrated Abu Sa’id Al-Khudri: Once Bilal brought Barni (i.e. a kind of dates) to the Prophet, peace be upon him, and the Prophet, peace be upon him, asked him, “From where have you brought these?” Bilal replied, “I had some inferior type of dates and exchanged two Sa’ of it for one Sa’ of Barni dates in order to give it to the Prophet, peace be upon him, to eat.

Thereupon the Prophet, peace be upon him, said, ‘Beware! Beware! This is definitely Riba (usury)! This is definitely Riba! Don’t do so, but if you want to buy (a superior kind) sell the inferior dates for money and then buy the superior kind of dates with that money.”
[3: 506- O.B. Sahih Al-Bukhari)

Of Gold/Silver For Gold/Silver —
Narrated Abu Said Al-Khudri: Allah’s Messenger, peace be upon him, said, “Do not sell gold for gold unless equivalent in weight (and from hand to hand), and do not sell less amount for greater amount or vice versa.

And do not sell silver for silver unless equivalent in weight (and from hand to hand), and do not less amount for greater amount or vice versa.

And do not sell gold or silver that is not present at the moment of exchange for gold or silver that is present.
[3: 385- O.B. Sahih Al-Bukhari)