All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad,
, is His slave and Messenger.
The reality of this loan as we understood from the question is that it is a loan based on Riba (interest and/or usury) but with the promise of considering it as a gift in case that the student succeeds in his/her studies, or waiving the interest in another case. Indeed, this does not change its reality, and we have already explained that in principle it is not permissible to enter into any contract that involves Riba even with the intention of avoiding the reasons that would lead to it.
For more benefit, please refer to Fataawa 98959 and 88473.
This is because the mere act of signing the contract that involves Riba and accepting it is not permissible if one does so willingly.
However, if a person is obliged by necessity to do that, then he is not sinful as Allaah Says (what means): {He has explained in detail to you what He has forbidden you, excepting that to which you are compelled.}[Quran 6:119]; but he should be determined to avoid the interest and pursue every possible means to do so.
Allaah Knows best.