This question already has an answer here:
Is it allowed to create an app that:
- is paid, which revenue goes to the developer of said app,
- allows users of said app to donate money to the developer of said app,
- contains ads which revenue goes to the developer of said app,
or any combination of these?
Second question: does it matter if the app is open or close sourced?
If anyone has more information to provide, feel free! But I think that the links to the questions and the resources that are linked in their answers cover pretty much everything about my initial question.