Xamarin InAppBilling Plugin - subscriptions and offer codes

SSB 86 Reputation points
2021-06-18T16:49:27.537+00:00

Hi,

I want to add an auto-renewable subscription to my Xamarin Forms which will unlock certain functionality within the app.

I have some questions about the ​Xamarin In App Billing plugin - does anyone here have any experience with that?

I've read through the docs on the plugin-page but still not clear on a few things..

https://jamesmontemagno.github.io/InAppBillingPlugin/

1) Does this plugin support the use of offer codes?

2) For restore purchases would I need to do any receipt validation? It looks like that is needed when you are doing server delivered content?

3) I am planning on the flow below - is there any better way or improvements to this?

a) check SecureStorage.GetAsync("subscriptionValidDate")

b) if subscriptionValidDate is greater than Today, then enable functionality

c) if it is null, or the date is in the past, then check the App Store to see if there is an active subscription (e.g. a renewal has happened)

d) if there is no active subscription, then prompt the user to buy one or allow them to Restore purchases.

If they tap restore purchases, check the app store to see if there is an active subscription and update subscriptionValidDate accordingly

If they buy a subscription sucessfully, then set subscriptionValidDate to the subscription end date
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,297 questions
{count} votes