Fulfilling an Oath is Obligatory
Question :
Once, I said: "I vow that if Allah saves me from this sin, I will give my mother-in-law a set of gold bangles." My mother-in-law did not know about this (what is the ruling)? Should I pay the bangles to my mother-in-law, or make the atonement for an oath?
Answer:
It is an obligation upon you to fulfill the vow if the aforementioned condition took place, according to the words of the Prophet ﷺ:
"Whoever vowed to obey Allah, he should obey Him and whoever vowed to disobey Allah, he should not disobey Him."
But if your mother-in-law forgave you, there is no objection, because the right is hers in this matter. And Allah is the Granter of success.
Source:
Ibn Baz
Fatawa Islamiyah, Vol. 6 Page 438