Ubayy Ibn Ka'b reported
I arked the Messenger of Allah (ﷺ) about a man who has sexual intercourse with his wife, but leaves her before orgasm. Upon this he (the Holy Prophet) said: He should wash the secretion of his wife, and then perform ablution and ofier prayer.