Two men brought their dispute to the Prophet ﷺ. The Prophet ﷺ asked the plaintiff to produce evidence, but he had no evidence. So he asked the defendant to swear. He swore by Allah "There is no god but He." The Messenger of Allah ﷺ said: Yes, you have done it, but you have been forgiven for the sincerity of the statement: "There is no god but Allah." Abu Dawud said: This tradition means that he did not command him to make atonement (Using translation from Abū Dāʾūd 3275)
أَنَّ رَجُلَيْنِ اخْتَصَمَا إِلَى النَّبِيِّ ﷺ فَسَأَلَ رَسُولُ اللهِ ﷺ الْمُدَّعِيَ الْبَيِّنَةَ فَلَمْ يَكُنْ لَهُ بَيِّنَةٌ فَاسْتَحْلَفَ الْمَطْلُوبَ فَحَلَفَ بِاللهِ الَّذِي لَا إِلَهَ إِلَّا هُوَ فَقَالَ رَسُولُ اللهِ ﷺ أَنْتَ قَدْ فَعَلْتَ وَلَكِنْ غُفِرَ لَكَ بِإِخْلَاصِكَ قَوْلَ لَا إِلَهَ إِلَّا اللهُ