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