Add In App Purchases to Your App
This feature is not available on all plans.
After you have created your in app purchases for iOS and Android, it's time to add them to your app. Here's an overview:
- Create the purchase page and add it to your app menu.
- Add the in app purchase plugin(s) to your site.
- Setup your validator
If using subscriptions, you can only have one subscription level in the app.
Create the Purchase Page
Begin by creating a new custom page. Add a new block, and choose the In App Purchase Form.
This block outputs a form that includes an email field for user registration. After purchase, a user is created through our in app purchase plugin.
productId - (required) must match your iOS in app purchase product ID
productIdAndroid - (optional) only use this if product ID is different for Android, otherwise Android will use productId above
isSubscription - (optional) set to "false" if this is a one-time purchase
removeAds - (optional) set to "true" if this purchase should remove Admob Ad banners
noLogin - (optional) set to "true" if login, registration, and validation with WordPress are not required. For example, if this purchase is just to remove ads in the app. No user will be created in WordPress.
Add purchase description
Next you'll need to add a description of the purchase. If your description is incomplete, your app may be rejected.
Save this page and add it to your menu.
First, login to your WordPress site and visit the AppPresser settings. Click the "Log" tab, then check "enable logging." This will allow you to see the API calls if there is a problem.
If you setup test users as per our documentation, you can build the app with dev certs for iOS, and no key for Android. Download the app to your test device and try the purchase.
For iOS, you will be prompted to login. Use your sandbox tester email and password.
For Android, you can add yourself as a tester in the Google Play Console under Settings => Manage Testers. You should be able to test the purchase with your normal account, or you can log in as a tester.
Test subscriptions do not match the normal schedule, you can look up the renewal times online.
Click here for a detailed article on testing Android in app purchases.