The Prophet (ﷺ) said: If anyone pays in advance he must not transfer it to someone else before he receives it.
Sunan Abi Dawud Book 24, Hadith 53