كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(26)
Chapter: It is recommended to recite statements of remembrance after the prayer, and how that is to be done
(26)
باب اسْتِحْبَابِ الذِّكْرِ بَعْدَ الصَّلاَةِ وَبَيَان صِفَتِهِ ‏
Sahih Muslim 593 e

Warrad, the scribe of Mughira b. Shu'ba, reported:

Mu'awiya wrote to Mughira: Write to me anything which you heard from the Messenger of Allah (ﷺ). So he (Mughira) wrote to him (Mu'awiya): I heard the Messenger of Allah (ﷺ) uttering (these words) at the completion of prayer:" There is no god but Allah. He is alone and there is no partner with Him. Sovereignty belongs to Him and to Him is praise due and He is Potent over everything. O Allah! no one can withhold what Thou givest, or give what Thou withholdest, and riches cannot avail a wealthy person with Thee."
وَحَدَّثَنَا ابْنُ أَبِي عُمَرَ الْمَكِّيُّ، حَدَّثَنَا سُفْيَانُ، حَدَّثَنَا عَبْدَةُ بْنُ أَبِي لُبَابَةَ، وَعَبْدُ الْمَلِكِ بْنُ عُمَيْرٍ، سَمِعَا وَرَّادًا، كَاتِبَ الْمُغِيرَةِ بْنِ شُعْبَةَ يَقُولُ كَتَبَ مُعَاوِيَةُ إِلَى الْمُغِيرَةِ اكْتُبْ إِلَىَّ بِشَىْءٍ سَمِعْتَهُ مِنْ رَسُولِ اللَّهِ صلى الله عليه وسلم ‏.‏ قَالَ فَكَتَبَ إِلَيْهِ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ إِذَا قَضَى الصَّلاَةَ ‏ "‏ لاَ إِلَهَ إِلاَّ اللَّهُ وَحْدَهُ لاَ شَرِيكَ لَهُ لَهُ الْمُلْكُ وَلَهُ الْحَمْدُ وَهُوَ عَلَى كُلِّ شَىْءٍ قَدِيرٌ اللَّهُمَّ لاَ مَانِعَ لِمَا أَعْطَيْتَ وَلاَ مُعْطِيَ لِمَا مَنَعْتَ وَلاَ يَنْفَعُ ذَا الْجَدِّ مِنْكَ الْجَدُّ ‏"‏ ‏.‏
Reference : Sahih Muslim 593e
In-book reference : Book 5, Hadith 179
USC-MSA web (English) reference : Book 4, Hadith 1234
  (deprecated numbering scheme)