Allah The Almighty Said (What means): "And if you repent, then for you is the principal of your wealth. You do not wrong, nor are you wronged." [Al-Baqarah/279]. This is the precautionary ruling regarding what you are asking about. You are entitled to the principal amount, and you should give the excess as charity to the poor and needy. If you are poor, you may take from it. And Allah The Almighty Knows Best.