Why would that be illegal? What kind of law do you think you might be violating? Any money you receive would of course be income, and thus be subject to the usual rules of your country. Plus, you need to adhere to the rules of the Google Play Store, but you agreed to those already, so
you should know what they are.