Implementing licensing mechanism for Applications Distributed in App store

I have an app that I intend to distribute via the App store. Currently, the user purchases a license from the website, he receives a key via email and our web server validates the license key entered by the user in the application. Is it possible to distribute the app in the App Store without any change ie:the user purchase on app store,he receives a key.

Can i distribute the trial version as free on App store?

No, and no.

You can't sell access to an app on a website. You can certainly sell the license/key in the app using an IAP just like you are doing on your website. But if you do that, you will have to have the app do something useful before the user purchases the license/key using an IAP.

Implementing licensing mechanism for Applications Distributed in App store
 
 
Q