Patents, inventions, copyright and so on belong to the inventor or author, and he has the right to receive payment for them, because it is customary that these rights have financial value in the marketplace.
The Islamic Fiqh Council has issued a statement to this effect, the text of which is as follows:
“The Islamic Fiqh Council, in its session held during its fifth conference in Kuwait, 1-6 Jumaada al-Awwal 1409 AH/10-15 December 1988 CE, after studying the research presented by members and experts on the topic of intangible rights, and listening to the discussions that were held concerning this topic, has determined the following:
Firstly: trade names, company names, trademarks, writings and inventions are all the copyright of their owners or authors, which in modern practice have acquired monetary value. These rights are respected by sharee’ah and it is not permissible to transgress against them.
If your work to invent this thing did not involve using any of the products belonging to the company, and you did not do it on company time, meaning that you worked on it outside of working hours, or at times when you were not required to work, then this is your exclusive right as stated above, and there is nothing wrong with selling it to your company or to an intermediate company who can sell it to your company.
But if that was at the expense of your work for the company, or you used the company’s materials, products or laboratory, then you have done wrong because you got distracted frin your work and because you used the company’s resources for a purpose other than that for which they were intended, and you have to compensate the company for what is their due. The basic principle is that you should tell them and work out an agreement to be paid for your efforts and invention. If you will be harmed by admitting this or you think it most likely that the company will not give you anything, then try to give them their due by any means possible after working out what you owe them with the help of experts in that field.
This right of the company, if it is proven, does not make it permissible to transgress against the company on the grounds that they did not give you an increase in your salary or that they did not appreciate your work and inventions, because two wrongs do not make a right. You should strive to improve your standing in the company by proper means, such as asking for it.
And Allah knows best.