With the In-app purchase component, you can unblock content after a purchase inside your app and therefore monetize content.
Note: : in-app purchase must be submitted to the 30% Apple and Google sales commission.
1. Set In-app Purchase with Apple and Google
Each in-app purchase has a unique identifier associated with your application. Follow these steps to configure in-app purchase in iTunes Connect and Google Play.
If your app is not yet published on the App Store and Google Play, these steps should be taken in parallel to your first submission. If your application is already published, prepare and submit a new IPA / APK incorporating this feature.
Set a name, a description, a price, an illustration image, translations ...
Go to iTunes Connect and select your application. Click on Features, then In-app purchase:
- Click on + to add an in-app purchase
- Choose the in-app purchase type: consumable, non-consumable, subscription with automatic renewal, subscription without automatic renewal
- Enter a reference name (for memo)
- In the Product ID field, enter a unique identifier that will be used for reporting. Composed of letters and numbers, it is usually like the app identifier e.g. com.company.app.productid
- Set the pricing from the list: 0.99 / 1,99 / 2,99 / 3,99 ...
- Provide in-app purchase information
Go to Google Play Developer Console, select your application and choose In-apps Products:
- Click on Add new product and choose between: Managed Product / Unmanaged product / Subscription
- Fill in the Product ID field by clicking on the app and choose the same as Apple: com.company.app.productIDSelect Price
- Select the pricing
2. Add in-app purchase in your application
To add paid content, use the In-app Purchase component. It is a non visual component, it unblocks after a purchase but does not have a visual appearance.
In the Properties window, enter the Product ID that is reported to Apple and Google: Product ID com.company.app.productid
To add the purchase, go to the Interactivity window, choose the trigger and the action Define action on a component. Available actions are:
- Restore Purchase
To unblock the paid content and set error messages, select the In-app Purchase component and go to the Interactivity window. Access to the following triggers:
- Not purchased
- Successful Payment
- Payment Error
You can then add the actions of your choice: go to a screen, open a pop-up (error message) ....