Depending on what you were selling it would be forbidden under either 3.1.1 In-App Purchase or 3.1.4 Hardware-Specific Content:
> Apps may not use their own mechanisms to unlock content or functionality, such as license keys, augmented reality markers, QR codes, etc.
> In limited circumstances, such as when features are dependent upon specific hardware to function, the app may unlock that functionality without using in-app purchase[...] You may not, however, require users to purchase unrelated products or engage in advertising or marketing activities to unlock app functionality.
> Apps may not use their own mechanisms to unlock content or functionality, such as license keys, augmented reality markers, QR codes, etc.
> In limited circumstances, such as when features are dependent upon specific hardware to function, the app may unlock that functionality without using in-app purchase[...] You may not, however, require users to purchase unrelated products or engage in advertising or marketing activities to unlock app functionality.