Imam Hasan al-Basri (may Allah have mercy on him) says that Sayyiduna Aqil bin Abi Talib (may Allah be pleased with him) came to Basra and married a woman from Banu Jusham. According to custom, people congratulated him and said: «بالرفاء والبنين» (that is, congratulations on your marriage with hopes of goodness, blessing, harmony, affection, and sons). Upon this, he said: Do not say this; the Messenger of Allah (peace and blessings be upon him) forbade us from saying «بالرفاء و البنين» and instructed us to say: «بَارَكَ اللّٰهُ لَكَ وَبَارَكَ عَلَيْكَ», meaning "May Allah bless you and may blessing be upon you."
It is narrated from Sayyiduna Abu Hurairah, may Allah be pleased with him, that when the Noble Prophet, peace and blessings be upon him, congratulated a groom on his marriage, he would say: “«بَارَكَ اللّٰهُ لَكَ وَبَارَكَ عَلَيْكَ وَجَمَعَ بَيْنَكُمَا فِيْ خَيْرٍ» May Allah bless you, shower blessings upon you, and unite you both in goodness.”