All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His Slave and Messenger.
If a person makes a vow to Allaah, the Exalted, then he is obliged to fulfill it. Allaah, the Exalted, says (what means): {…and fulfill their vows …} [Quran 22:29]
The Prophet, sallallaahu ‘alayhi wa sallam, said: "Whoever vowed to offer an act of obedience to Allaah, the Exalted, must do it; and whoever vowed to disobey Allaah, the Exalted, must not disobey Him." [Al-Bukhari, Abu Daawood, An-Nasaa’i, At-Tirmithi and Ibn Maajah]
If the vow-taker is unable to fulfill his vow because he lacks the needed money to fulfill it, then the obligation of fulfilling his vow is waived (i.e. he is exempted from fulfilling it). In this case, it is incumbent on him to offer an expiation like that for breaking an oath. The Prophet, sallallaahu ‘alayhi wa sallam, said: "The expiation (for such a vow) is like the expiation for breaking an oath." [Muslim]
Ibn ‘Abbaas reported that the Prophet, sallallaahu ‘alayhi wa sallam, said:
"Whoever takes a vow but does not name it (i.e. does not state it specifically), the expiation (for such a vow) is like the expiation for breaking an oath. Whoever takes a vow that he is unable to fulfill, the expiation (for such a vow) is like the expiation for breaking an oath." [Abu Daawood and Ibn Maajah]
There is an addition in the version reported by Ibn Maajah that reads, "Whoever takes a vow that he is able to fulfill should fulfill it." [Ibn Maajah]
Ash-Shawkani said:
"When a person takes a specific vow to do a certain act of obedience but is unable to fulfill it, then he should offer an expiation like that for breaking an oath. If he is able to fulfill it, then he should do so, whether it is related to his body or money (i.e. the vow is to do a physical or financial act of worship). If the vow is to do an act of disobedience, then it is impermissible for the vow-taker to fulfill it. Such a vow is not considered valid or binding, and no expiation is due. If the person takes a vow to do a permissible act and is able to do it, then the preponderant opinion is that such a vow is valid and binding, and expiation is due when the vow-taker breaks his vow. This is because the obligation to fulfill such a vow is highlighted in the story of the woman who vowed to walk to the House of Allaah, the Exalted (i.e. she took a vow to travel for Hajj on foot). If the vow-taker is unable to fulfill his vow, then he is obliged to offer an expiation. This is due to the generality of the hadith that reads, "Whoever takes a vow that he is unable to fulfill, the expiation (for such a vow) is like the expiation for breaking an oath." This is what is concluded from the authentic hadiths that have been reported in this regard." [Nayl Al-Awtar]
Allaah Knows best.