Bilal came to the Prophet ﷺ with some Barni dates. The Prophet ﷺ asked him, "Where did these come from?"Bilal replied, "I had some poor-quality dates, so I sold two measures of them for one measure of these to feed the Prophet ﷺ."At that, the Prophet ﷺ said, "Oh no, oh no! This is the very essence of riba. Do not do this. Rather, when you want to buy good dates, sell your dates in a separate transaction, then use the proceeds to buy what you want."
جاء بلال إلى النبي ﷺ بتمر برني، فقال له النبي ﷺ من أين هذا؟ قال بلال: كان عندي تمر رديء، فبعت منه صاعين بصاع النطعم النبي ﷺ، فقال النبي ﷺ عند ذلك: أوه، أوه، عين الربا، لا تفعل، ولكن إذا أردت أن تشتري فبع التمر ببيع آخر، ثم اشتريه.
Bukhari narrated it in the Book of Agency (2312), and Muslim in the Book of Sharecropping (1594), through the route of Muawiya bin Salam, who said, Yahya (that is, Ibn Abu Kathir) told me, he said, I heard Uqbah bin Abdul-Ghafir, that he heard Abu Saeed Khudri say, and then he mentioned it.His saying, "Oh, oh," is a word said when in pain.