The Messenger of Allah ﷺ forbade combining a loan with a sale, stipulating two conditions in a single sale, and profiting from what one does not yet possess.
أخبرنا إسمعيل بن مسعود عن خالد عن حسين المعلم
أن رسول الله ﷺ نهى عن سلف وبيع وشرطين في بيع وربح ما لم يضمن