The Messenger of Allah ﷺ said, "There is no riba in transactions made hand to hand." He meant that riba occurs only in deferred transactions.
حدثنا يحيى بن إسحاق وعفان قالا ثنا وهيب حدثنا عبد الله بن طاوس عن أبيه عن ابن عباس
أن رسول الله ﷺ قال لا ربا فيما كان يدا بيد قال يعني إنما الربا في النسيئة
Its isnad is sahih, its narrators are trustworthy and well-known, and the hadith was narrated by Bukhari with similar wording in 4/381, no. 2179 of Fath al-Bari, and Muslim with identical wording in 3/1218, no. 1596, in the chapter on musaqah, and Nasai in 7/286, and Tabarani in Al-Kabir 1/140, no. 448.