The Prophet ﷺ said: “If you marry a woman or buy a slave, place your hand on her forehead, say ‘bismillaah’ and supplicate for blessing and say:
اللَّهُمَّ إِنِّي أَسْأَلُكَ مِنْ خَيْرِهَا وَخَيْرِ مَا جَبَلْتَهَا عَلَيْهِ وَأَعُوذُ بِكَ مِنْ شَرِّهَا وَشَرِّ مَا جَبَلْتَهَا عَلَيْهِ
(O Allaah, indeed I ask You for the good in her and the good characteristics You have created in her, and I seek refuge in You from the evil in her and the evil characteristics You have created in her)
If you buy a camel, place your hand on top of its hump and say the same.”
“This narration has evidence that Allaah is the Creator of good and evil, contrary to those – such as the Mu`tazilah and others – who hold that evil is not from His creation تبارك وتعالى. There is nothing in Allaah’s being Creator of evil that contradicts His Perfection تعالى, rather it is part of His Perfection تبارك وتعالى. Details of that are present in comprehensive volumes, one of the best being the book Shifaaul-`Aleel fil-Qadhaa’i wal-Qadari wat-Ta`leel by Ibnul-Qayyim, so consult it if you wish.
Also, is this supplication legislated in the event of buying something like a car? My answer is: yes, due to the good that is hoped from it and the evil that is feared from it.”
 Saheeh Abu Daawood 2160 and others
[aadaabuz-zifaaf 92-93 / alalbaany.com]