From Sahih Muslim (Hadith 3561):
Jabir (Allah be pleased with him) reported:We used to practise 'azl during the lifetime of Allah's Messenger (ﷺ). This (the news of this practise) reached Allah's Apostle (ﷺ), and he did not forbid us
Reference: Muslim 3561