You could create a new in-app purchase that unlocks the same feature and set the price to FREE.
If the user provides the code before unlocking, use this new in-app identifier ID.
Topic:
App & System Services
SubTopic:
StoreKit
Tags: