Question: A man took a usurious loan and built a house with it. Now he has repented from this sin. So what does he do with this house he built?
Answer: “He seeks the forgiveness of Allah and benefits from the house. If he did not know that the action he did was usury, then he is excused of that and pardoned because he made a contract in something he did not know was usury. However, if he knew it was usury, then no doubt he is a sinner because he entered into a contract upon clarity, knowledge, and insight. So he should seek forgiveness of Allah and repent for what happened and benefit from the house”.
[Sharh Ibn Majah no. 277]
Faisal Ibn Abdul Qaadir Ibn Hassan