Sunan an-Nasa'i, Hadith 1249 ⓘ
It was narrated 'Abdullah bin Ja'far that : The Messenger of Allah said: "Whoever has doubt during his prayer, let him prostrate twice after he said the taslim."
أَخْبَرَنَا مُحَمَّدُ بْنُ هَاشِمٍ، أَنْبَأَنَا الْوَلِيدُ، أَنْبَأَنَا ابْنُ جُرَيْجٍ، عَنْ عَبْدِ اللَّهِ بْنِ مُسَافِعٍ، عَنْ عُتْبَةَ بْنِ مُحَمَّدِ بْنِ الْحَارِثِ، عَنْ عَبْدِ اللَّهِ بْنِ جَعْفَرٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " مَنْ شَكَّ فِي صَلاَتِهِ فَلْيَسْجُدْ سَجْدَتَيْنِ بَعْدَ التَّسْلِيمِ " .
also referenced under: Book 13, Hadith 71 (In-Book) & Volume 2, Book 13, Hadith 1250 (DarusSalam)