This is very explicitly not allowed for iOS applications. To quote the App Store review guidelines:
11.1. Apps that unlock or enable additional features or functionality
with mechanisms other than the App Store will be rejected
11.2. Apps utilizing a system other than the In-App Purchase API (IAP)
to purchase content, functionality, or services in an App will be
rejected