Find file History

In-App Purchase samples for Xamarin.iOS

This sample contains THREE projects, a new (April 2014) sample for the Xamarin In App Purchase Component, and two older samples: one that demonstrates Consumable purchases and one that demonstrates NonConsumable purchases.

Component Sample

Xamarin has just (April 2014) released an In App Purchase Component that helps to implement purchasing in iOS.

The code in the ComponentSample folder (OneCoolThing app) contains a minimal example of using In App Purchase to unlock a "feature" using the Non-Consumable product type. It has a single 'buy' button and alse implements 'restore'.


A lot of the complexity of the StoreKit APIs is wrapped in the component API - just wire up a few event handlers and the component code will help manage the purchasing process and keeping track of purchases in a secure manner.

Old samples (using StoreKit APIs directly)

The older samples implement the StoreKit APIs directly

NOTE: it does NOT YET demonstrate RECEIPT VERIFICATION, so you'll have to add this in yourself.

screenshot screenshot

You might also consider services like or (although I have not tried them, so can't recommend).

Check out @redth's server-side code to help build your own receipt verification logic with ASP.NET:

FYI my sample code is based in-part on @jtclancey's AppStore code here:


There's a bit of set-up required for In-App Purchases (registering your bank details with Apple, setting up the products in the iOS Developer Portal, Provisioning your app correctly). These steps are the same for MonoTouch and Objective-C, so Apple's setup doco might help [1]. You should also read Apple's In-App Purchase programming docs [2], for familiarity.