Sunan an-Nasa'i, Hadith 3830 ⓘ
It was narrated from Ibn 'Umar that the Messenger of Allah said: "Whoever swears an oath and says, 'If Allah wills,' then he has the choice: If he wishes, he may go ahead, and if he wishes he may not."
أَخْبَرَنَا أَحْمَدُ بْنُ سُلَيْمَانَ، قَالَ حَدَّثَنَا عَفَّانُ، قَالَ حَدَّثَنَا وُهَيْبٌ، قَالَ حَدَّثَنَا أَيُّوبُ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " مَنْ حَلَفَ عَلَى يَمِينٍ فَقَالَ إِنْ شَاءَ اللَّهُ فَهُوَ بِالْخِيَارِ إِنْ شَاءَ أَمْضَى وَإِنْ شَاءَ تَرَكَ " .
also referenced under: Book 35, Hadith 70 (In-Book) & Volume 4, Book 35, Hadith 3861 (DarusSalam)