Sunan Ibn Majah, Hadith 2283

It was narrated from Abu Sa'eed that the Messenger of Allah said: "When you have paid in advance for something, do not exchange it for something else." (Da'if)Another chain with similar wording.

حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ، حَدَّثَنَا شُجَاعُ بْنُ الْوَلِيدِ، حَدَّثَنَا زِيَادُ بْنُ خَيْثَمَةَ، عَنْ سَعْدٍ، عَنْ عَطِيَّةَ، عَنْ أَبِي سَعِيدٍ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏ "‏ إِذَا أَسْلَفْتَ فِي شَىْءٍ فَلاَ تَصْرِفْهُ إِلَى غَيْرِهِ ‏" ‏ ‏.‏

sunnah.com