All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The majority of the scholars are of the view that it is unlawful to pay the value of the expiation for the oath. However, Al-Awzaa’i and Abu Haneefah are of the view that it is lawful to do so. But, the opinion of the majority of the scholars is the preponderant opinion as Allah Says (what means):
{Allah will not impose blame upon you for what is meaningless in your oaths, but He will impose blame upon you for [breaking] what you intended of oaths. So its expiation is the feeding of ten needy people from the average of that which you feed your [own] families or clothing them or the freeing of a slave.} [Quran 5:89]
So, Allah limited the expiation of the oath to these three categories. If payment of the value in cash had been lawful, specifying or limiting these three categories would have no meaning.
As regards justifying giving the value in cash because the objective is to fulfill the need of the poor and this meets the value of the expiation and it may even be better, then Ibn Al-Arabi said in his book entitled Ahkaam Al-Quraan: “If you consider fulfilling the need, then what about the act of worship and the text of the Quran about the three categories and the gradual switch from one kind to another.”
Therefore, it is not permissible to give the value of the expiation and it should not be given for the building of the mosque. So, we advise you to give the money to a trustworthy agency or person and mandate them to buy the food in a place where there are needy Muslims like in Palestine or other countries and distribute the food among those needy people according to the staple food that you feed your own family.
For more benefit on expiating for the oath, please refer to Fataawa 81387 and 81501.
Allah knows best.