Exchanging gold for gold

Q: Once I went to the gold market to sell my wedding ring and buy a smaller one. I went in one of the stores and they offered to pay me 80 riyals for the ring and I agreed. Then, I found the ring that fits me in the same store (Part No. 13; Page No. 496) and its price was 70 riyals. The store owner paid me the price of my ring and I paid him 100 riyals to take the price of the new ring and give me back 30 riyals. He did not have the change and asked me to take back my 100 riyals and pay him the exact amount from the money he just gave me for the old ring. I refused as this may be considered Riba (usury) but he denied it since the exchange had already taken place. So I paid him 70 riyals from the price of the one I had sold, after I had taken its price in my possession. I did not have the intention to pay from that money but he did not find enough change to give me. Please, enlighten me! May Allah reward you. Does this transaction involve Riba? What should I do if it involves Riba? May peace and blessings be upon our Prophet Muhammad. As-salamu `alaykum warahmatullah wabarakatuh (May Allah's Peace, Mercy, and Blessings be upon you!)

A: Anyone who wishes to trade gold for gold should sell the gold they have and take the price, then they may buy the gold they want from the buyer or any other person with the price they got or any other money. It is authentically reported that the Prophet (peace be upon him) said, "Gold is to be paid for gold, like for like, silver for silver, like for like..." Then he (peace be upon him) said, "If these types differ, sell as you wish if payment is made hand to hand." Consequently, there is no harm in selling your gold and taking the price and then buying other gold from the buyer, even if you pay from the money the buyer paid you. (Part No. 13; Page No. 497)  May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his Family, and Companions.