Implement offer codes to make app free

Hello! I want to implement a system in my app in which I will require the user to input a promotional code. If the user inputs a code, the app will have full functionalities, in the other case, the app will be a "lite" version. I don't want to sell anything; the content of the app depends only on whether the user has inputted the promo code. Is this behavior permitted by App Store? In the case it does, do I need to use the store "In app purchase" flow or may I handle all this logic by myself?

Thanks!

Implement offer codes to make app free
 
 
Q