I asked Messenger of Allah ﷺ about a man who engages in sexual intercourse with his wife but does not discharge. He replied, "He should wash the parts which comes in contact with the private parts of the woman, perform ablution and then pray." (Abu ʿAbdullah said, "Taking a bath is safer and is the last order.")
أَنَّهُ قَالَ يَا رَسُولَ اللَّهِ إِذَا جَامَعَ الرَّجُلُ الْمَرْأَةَ فَلَمْ يُنْزِلْ قَالَ يَغْسِلُ مَا مَسَّ الْمَرْأَةَ مِنْهُ ثُمَّ يَتَوَضَّأُ وَيُصَلِّي قَالَ أَبُو عَبْدِ اللَّهِ الْغَسْلُ أَحْوَطُ وَذَاكَ الآخِرُ وَإِنَّمَا بَيَّنَّا لاِخْتِلاَفِهِمْ