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.
If these procedures are originally lawful, then the money taken for promoting and marketing them is accordingly lawful, and if they are originally forbidden, then the money taken for promoting and marketing them is accordingly forbidden. In his Kitaab Al-Funoon, Ibn ‘Aqīl said, "The School of Law of Imam Ahmad undoubtedly prohibits the compensation for every forbidden substance. He cited in evidence the Hadith of the Prophet reading, “May Allah curse the Jews! Fats were prohibited to them, but they melted them and sold them. Most surely, when Allah forbids something, He, the Exalted, accordingly prohibits its price.’”
In his Al-Muhadh-dhab, Ash-Shiraazi said, “It is permissible to conclude a lease contract on lawful benefits while it is impermissible on unlawful ones, and thus it is impermissible to take compensation for the contract concluded on unlawful substances.”
In his Adh-Dhakheerah, Al-Qaraafi said, “Compensation should not be taken for unlawful benefits.”
Allah knows the best.