Two transactions combined into one are not permitted. The Messenger of Allah ﷺ said, "Allah has cursed the one who consumes usury, the one who pays it, the one who witnesses it, and the one who records it."
حدثنا محمد حدثنا شعبة عن سماك بن حرب قال سمعت عبد الرحمن بن عبد الله يحدث
لا تصلح سفقتان في سفقة وإن رسول الله ﷺ قال لعن الله آكل الربا وموكله وشاهده وكاتبه