InAppBillingPlugin

Cross-platform In App Billing Plugin for Xamarin


Project maintained by jamesmontemagno Hosted on GitHub Pages — Theme by mattgraham

Securing In-App Purchases (Receipt Validation)

Each platform handles security of In-App Purchases a bit different. To handle this whenever you make a purchase request or a request where validation needs to be done there is an optional parameter that takes in a IInAppBillingVerifyPurchase.

Based on the platform this data is a bit different and is returned as part of the InAppBillingPurchase:

iOS

Android

UWP

No additional authentication is provided.

Android Security

I recommend reading the Google Play services Security and Design that will walk you through your options on storing your public key.

Server Side Validation

Not only should your receipt be verified in the app, but ideally it should be verified on a server. I leave this in your hands to add the server side validation by reading Apple and Google’s documentation. I provide everything you need in the VerifyPurchase method to handle verification.

For examples of implementation I would recommend reading a great blog series by Jonathan Peppers:

<= Back to Table of Contents