Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:17865Abū ʿAlī al-Rūdhbārī > Abū Bakr Muḥammad b. Aḥmad b. Maḥmawayh al-ʿAskarī > Jaʿfar b. Muḥammad al-Qalānisī > Ādam b. Abū Iyās > Shuʿbah > al-Ḥakam > Muḥammad b. Kaʿb al-Quraẓī > Zayd b. Arqam Lammā

[Machine] Abdullah ibn Ubayy said, "Do not spend on those who are with the Messenger of Allah until they disperse." He also said, "If we return to Medina, the more honorable will expel the lowly from it." I informed the Messenger of Allah, ﷺ , about this, and I went to him. He said, "Verily, Allah has confirmed and excused you, and He has revealed the verse, 'They are the ones who say, 'Do not spend on those who are with the Messenger of Allah until they disperse''" (Quran 63:7).  

البيهقي:١٧٨٦٥أَخْبَرَنَا أَبُو عَلِيٍّ الرُّوذْبَارِيُّ ثنا أَبُو بَكْرٍ مُحَمَّدُ بْنُ أَحْمَدَ بْنِ مَحْمَوَيْهِ الْعَسْكَرِيُّ ثنا جَعْفَرُ بْنُ مُحَمَّدٍ الْقَلَانِسِيُّ ثنا آدَمُ بْنُ أَبِي إِيَاسٍ ثنا شُعْبَةُ عَنِ الْحَكَمِ قَالَ سَمِعْتُ مُحَمَّدَ بْنَ كَعْبٍ الْقُرَظِيَّ يَقُولُ سَمِعْتُ زَيْدَ بْنَ أَرْقَمَ ؓ لَمَّا قَالَ

عَبْدُ اللهِ بْنُ أُبَيٍّ لَا تُنْفِقُوا عَلَى مَنْ عِنْدَ رَسُولِ اللهِ حَتَّى يَنْفَضُّوا وَقَالَ أَيْضًا لَئِنْ رَجَعْنَا إِلَى الْمَدِينَةِ لَيُخْرِجَنَّ الْأَعَزُّ مِنْهَا الْأَذَلَّ أُخْبِرْتُ بِذَلِكَ عَنْ رَسُولِ اللهِ ﷺ فَأَتَيْتُهُ فَقَالَ إِنَّ اللهَ صَدَّقَكَ وَعَذَرَكَ وَنَزَّلَ {هُمُ الَّذِينَ يَقُولُونَ لَا تُنْفِقُوا عَلَى مَنْ عِنْدَ رَسُولِ اللهِ حَتَّى يَنْفَضُّوا} [المنافقون 7] الْآيَةَ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ آدَمَ بْنِ أَبِي إِيَاسٍ

See similar narrations below:

Collected by Bukhārī
bukhari:4902Ādam > Shuʿbah > al-Ḥakam > Muḥammad b. Kaʿb al-Quraẓī > Zayd b. Arqam > Lammā

When ʿAbdullah bin Ubai said, "Do not spend on those who are with Messenger of Allah ﷺ," and also said, "If we return to Medina," I informed the Prophet ﷺ of his saying. The Ansar blamed me for that, and ʿAbdullah bin Ubai swore that he did not say. I returned to my house and slept. Messenger of Allah ﷺ then called me and I went to him. He said, "Allah has confirmed your statement." The Verse: "They are the one who say: Spend nothing......(63.7) was revealed.  

البخاري:٤٩٠٢حَدَّثَنَا آدَمُ حَدَّثَنَا شُعْبَةُ عَنِ الْحَكَمِ قَالَ سَمِعْتُ مُحَمَّدَ بْنَ كَعْبٍ الْقُرَظِيَّ قَالَ سَمِعْتُ زَيْدَ بْنَ أَرْقَمَ ؓ قَالَ لَمَّا قَالَ

عَبْدُ اللَّهِ بْنُ أُبَىٍّ لاَ تُنْفِقُوا عَلَى مَنْ عِنْدَ رَسُولِ اللَّهِ وَقَالَ أَيْضًا لَئِنْ رَجَعْنَا إِلَى الْمَدِينَةِ أَخْبَرْتُ بِهِ النَّبِيَّ ﷺ فَلاَمَنِي الأَنْصَارُ وَحَلَفَ عَبْدُ اللَّهِ بْنُ أُبَىٍّ مَا قَالَ ذَلِكَ فَرَجَعْتُ إِلَى الْمَنْزِلِ فَنِمْتُ فَدَعَانِي رَسُولُ اللَّهِ ﷺ فَأَتَيْتُهُ فَقَالَ إِنَّ اللَّهَ قَدْ صَدَّقَكَ وَنَزَلَ {هُمُ الَّذِينَ يَقُولُونَ لاَ تُنْفِقُوا} الآيَةَ وَقَالَ ابْنُ أَبِي زَائِدَةَ عَنِ الأَعْمَشِ عَنْ عَمْرٍو عَنِ ابْنِ أَبِي لَيْلَى عَنْ زَيْدٍ عَنِ النَّبِيِّ ﷺ