Sunan Ibn Majah, Book 12, Hadith 147 (Ibn Majah 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.