Washing a Muslim who has died is an act of worship that Allaah has enjoined on the Muslims, so it should be done with the aim of seeking reward and seeking the pleasure of Allaah.
If the family of the deceased give him some money without him stipulating that, there is nothing wrong with him accepting it.
But if the person who washes the dead stipulates that he will not wash the deceased unless he is paid a certain amount of money, that is permissible but it will detract from his reward with Allaah.
It says in Kashshaaf al-Qinaa’ (2/86):
It is makrooh to take payment for washing, shrouding, carrying and burying the deceased. It says in al-Mubdi’: Ahmad regarded it as makrooh for the one who washes the deceased or digs the grave to receive payment for his work unless he is in need, in which case he may be given from the bayt al-maal. If that is not possible he may be paid according to his work. End quote.
Shaykh Ibn ‘Uthaymeen was asked: Is it permissible to take payment in return for washing and shrouding the dead?
if this payment or gift is given without being stipulated, there is no doubt that it is permissible and there is nothing wrong with that, because it is given to the one who washed and shrouded the deceased person in return for his work. The Prophet (blessings and peace of Allaah be upon him) said “Whoever does you a favour, reciprocate.”
But if this payment is stipulated, then undoubtedly it detracts from the reward of the one who washes and shrouds the deceased, because the one who washes and shrouds the deceased attains a great reward, as washing and shrouding the dead is a communal obligation (fard kifaayah); so the one who washes and shrouds the dead attains the reward of a communal obligation. But if he takes payment for that, then his reward will be diminished. But there is nothing wrong with him taking payment for that, because this payment is in return for work done for another, and in the case of such work it is permissible to accept payment for it, just as it is permissible to accept payment for teaching Qur'aan, according to the correct view. End quote.
Fataawa Noor ‘ala al-Darb, 7/36.
The scholars of the Standing Committee for Issuing Fatwas were asked: What is the ruling on receiving payment for washing the dead, whether that payment was stipulated or not?
It is permissible, but it is better to do it voluntarily if possible. And Allaah is the source of strength; may Allaah send blessings and peace upon our Prophet Muhammad and his family and Companions. End quote.
Fataawa al-Lajnah al-Daa’imah, 15/112
Shaykh ‘Abd al-‘Azeez ibn ‘Abd-Allaah ibn Baaz, Shaykh ‘Abd al-Razzaaq ‘Afeefi, Shaykh ‘Abd-Allaah ibn Ghadyaan, Shaykh ‘Abd-Allaah ibn Qa’ood
The payment that is stipulated by the one who washes the dead should be commensurate with his work, without any exaggeration or taking advantage.
And Allaah knows best.