It is not permissible for a gold trader to stipulate on other traders who sell on his behalf to repay in gold when the price of gold goes up, as this falls under
selling gold for gold without the exchange taking place on the spot. (Part No. 13; Page No. 498) In order to sell gold for gold, both amounts must be equal and the exchange must take place on the spot before both parties leave.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.