Sahih Muslim , Book 19, Hadith 4404 (USC-MSA)

It has been narrated on the authority of Anas that the Quraish made peace with the Prophet. Among them was Suhail b. Amr. The Prophet said to 'Ali: Write" In the name of Allah, most Gracious and most Merciful." Suhail said: As for" Bismillah," we do not know what is meant by" Bismillah-ir-Rahman-ir-Rahim" (In the name of Allah most Gracious and most Merciful). But write what we understand, i. e. Bi ismika allahumma (in thy name. O Allah). Then, the Prophet said: Write:" From Muhammad, the Messenger of Allah." They said: If we knew that thou welt the Messenger of Allah, we would follow you. Therefore, write your name and the name of your father. So the Prophet said: Write" From Muhammad b. 'Abdullah." They laid the condition on the Prophet that anyone who joined them from the Muslims, the Meccans would not return him, and anyone who joined you (the Muslims) from them, you would send him back to them. The Companions said: Messenger of Allah, should we write this? He said: Yes. One who goes away from us to join them-may Allah keep him away! and one who comes to join us from them (and is sent back) Allah will provide him relief and a way of escape.

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَفَّانُ، حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ، عَنْ ثَابِتٍ، عَنْ أَنَسٍ، أَنَّ قُرَيْشًا، صَالَحُوا النَّبِيَّ صلى الله عليه وسلم فِيهِمْ سُهَيْلُ بْنُ عَمْرٍو فَقَالَ النَّبِيُّ صلى الله عليه وسلم لِعَلِيٍّ ‏"‏ اكْتُبْ بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ ‏"‏ ‏.‏ قَالَ سُهَيْلٌ أَمَّا بِاسْمِ اللَّهِ فَمَا نَدْرِي مَا بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ وَلَكِنِ اكْتُبْ مَا نَعْرِفُ بِاسْمِكَ اللَّهُمَّ فَقَالَ ‏"‏ اكْتُبْ مِنْ مُحَمَّدٍ رَسُولِ اللَّهِ ‏"‏ ‏.‏ قَالُوا لَوْ عَلِمْنَا أَنَّكَ رَسُولُ اللَّهِ لاَتَّبَعْنَاكَ وَلَكِنِ اكْتُبِ اسْمَكَ وَاسْمَ أَبِيكَ ‏.‏ فَقَالَ النَّبِيُّ صلى الله عليه وسلم ‏"‏ اكْتُبْ مِنْ مُحَمَّدِ بْنِ عَبْدِ اللَّهِ ‏"‏ ‏.‏ فَاشْتَرَطُوا عَلَى النَّبِيِّ صلى الله عليه وسلم أَنَّ مَنْ جَاءَ مِنْكُمْ لَمْ نَرُدَّهُ عَلَيْكُمْ وَمَنْ جَاءَكُمْ مِنَّا رَدَدْتُمُوهُ عَلَيْنَا فَقَالُوا يَا رَسُولَ اللَّهِ أَنَكْتُبُ هَذَا قَالَ ‏"‏ نَعَمْ إِنَّهُ مَنْ ذَهَبَ مِنَّا إِلَيْهِمْ فَأَبْعَدَهُ اللَّهُ وَمَنْ جَاءَنَا مِنْهُمْ سَيَجْعَلُ اللَّهُ لَهُ فَرَجًا وَمَخْرَجًا ‏"‏ ‏.‏

sunnah.com