‘Abdallah b. Mas'ud reported God's Messenger as saying, “Trying to earn a lawful livelihood is an obligatory duty in addition to the duties which are obligatory.”
Narrated Abu Umama reported God’s Messenger as saying:
"Do not sell, buy or teach singing-girls, and the price paid for them is unlawful. To similar effect has been sent down, 'Among men are those who purchase frivolous talk' (Al-Qur'an 31:6).
Ahmad, Tirmidhi and Ibn Majah transmitted it, Tirmidhi saying that this is a gharib tradition and that ‘Ali b. Yazid the transmitter is declared to be a weak traditionist.
Ibn ‘Abbas was asked about payment for writing a copy of the Qur’an and replied, “There is no harm. They are just people who draw figures and get a living simply by their handiwork.”
Abu Huraira said God's Messenger prohibited payment for a dog and the earnings of the prostitute*.
* Zammara. This word is said by a number of authorities to mean a prostitute, but it can also mean a woman who plays the oboe (mizmar).