Fovea.Billing

is now IAPTIC, please go to the new and better version of our system.

iOS Application Receipts

On iOS, the cordova plugin define a virtual application product.

This product type is application and its id is the application bundle identifier. The receipt for this product is the Application Receipt, it contains information about all purchases made by the user.

Validating the application receipt when the app starts will allow purchases made from another device to be caught by the app. It is also used by the plugin to refresh subscription status. It also validates that the app has been installed legally on the device (useful for paid apps).

Setup Application Receipts validation

Quick reminder, with Cordova you start a product validation by doing this:

store.when(FILTER).approved(p => p.verify())

The filter for can a product identifier, a product type, or the special string “product” which matches all products.

When using Fovea’s receipt validator, it’s recommended to use the special “product” string:

store.when("product").approved(p => p.verify())

This way, receipts for all products are validated, including the “application” product. In your dashboard, you should now see validation events when your app starts, with the ID set to you Apple bundle identifier.

IMPORTANT

Apps installed through the AppStore contain an Application Receipt as soon as the app is started. It is made available to the plugin without requiring the user for his AppStore login and password.

This is not the case when the app is installed with XCode or a command line utility. App started this way do not contain an Application Receipt. It will be loaded when store.refresh() is called. You’ll be required to enter your login and password for the receipt to be loaded.