The Messenger of Allah ﷺ set out at the time of Hudaybiyyah... and in the narration it states,Suhayl bin Amr came and said, "Come, let us write a treaty between us and you."So the Prophet ﷺ called the scribe, and the Prophet ﷺ said, "Write, In the name of Allah, the Most Gracious, the Most Merciful."Suhayl objected, "As for ar-Rahman, by Allah, I do not know what that is. Rather, write, In Your name, O Allah, as you used to write before."The Muslims protested, "By Allah, we will not write it except as, In the name of Allah, the Most Gracious, the Most Merciful."The Prophet ﷺ said, "Write, In Your name, O Allah..." and the hadith continues.
خرج رسول الله ﷺ زمن الحديبية… وفيه: فجاء سهيل بن عمرو، فقال: هات، اكتب بيننا وبينكم كتابا، فدعا النبي ﷺ الكاتب، فقال النبي ﷺ: بسم الله الرحمن الرحيم. قال سهيل: أما الرحمن، فوالله! ما أدرى ما هو؟ ولكن اكتب باسمك اللهم. كما كنت تكتب، فقال المسلمون: والله لا نكتبها إلا بسم الله الرحمن الرحيم. فقال النبي ﷺ: اكتب باسمك اللهم… الحديث.
Bukhari narrated it in "Conditions" (2731-2732) from Abdullah bin Muhammad, who said, Abdul-Razzaq narrated to us, Mamar informed us, who said, Zuhri informed me, who said, Urwa bin Zubayr informed me, from Miswar bin Makhrama and Marwan, who both related it.