Suhayl ibn Amr came for Quraysh to write the agreement. The Prophet ﷺ asked the scribe to begin with Bismillah ar-Rahman ar-Rahim. Suhayl objected and asked for "Bismika Allahumma" instead, and the Prophet ﷺ agreed. When the text said "Muhammad, the Messenger of Allah", Suhayl objected again, and the Prophet ﷺ had it written as "Muhammad ibn Abdillah", saying that he was truly the Messenger of Allah even if they denied him.
The conditions, as the hadith mentions them, were that the Muslims would not enter Makkah that year but could come the next year to perform the tawaf, and that any man who came from Quraysh to the Prophet ﷺ would be returned, even if he was Muslim. This was hard for the Muslims. Abu Jandal, a Muslim who had been tortured, arrived in chains during the writing, and Suhayl demanded that he be sent back.
Umar ibn al-Khattab (may Allah be pleased with him) then came to the Prophet ﷺ and asked whether he was truly the Prophet of Allah, whether the Muslims were on the truth and their enemies on falsehood, and why they accepted what seemed to lower their religion. The Prophet ﷺ answered that he was the Messenger of Allah, that he would not disobey Him, and that Allah would help him. Abu Bakr (may Allah be pleased with him) gave Umar the same answer when he asked him, and Umar said that he did many good deeds afterwards because of what he had said.