If the case is as you mentioned, this transaction is Haram (prohibited), because it is
selling dirhams for dirhams, which is the prohibited Riba (usury) according to the Qur'an, the Sunnah and the Ijma` (consensus of scholars). (Part No. 13; Page No. 326) The seller has also sold what they do not own, and this was forbidden by the Prophet (peace be upon him).
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.