![]() |
VOOZH | about |
dotnet add package Plugin.InAppBilling --version 10.0.0
NuGet\Install-Package Plugin.InAppBilling -Version 10.0.0
<PackageReference Include="Plugin.InAppBilling" Version="10.0.0" />
<PackageVersion Include="Plugin.InAppBilling" Version="10.0.0" />Directory.Packages.props
<PackageReference Include="Plugin.InAppBilling" />Project file
paket add Plugin.InAppBilling --version 10.0.0
#r "nuget: Plugin.InAppBilling, 10.0.0"
#:package Plugin.InAppBilling@10.0.0
#addin nuget:?package=Plugin.InAppBilling&version=10.0.0Install as a Cake Addin
#tool nuget:?package=Plugin.InAppBilling&version=10.0.0Install as a Cake Tool
Important Note: I do not plan on continuing support for this library. As noted in April of 2025: In App Purchase APIs have always been extremely complex, hard to manage, hard to update, and hard to streamline into a single API. I have enjoyed working and evolving this project over the years, but with StoreKit being deprecated for StoreKit2 and the ever-evolving Android Billing Library that always has massive changes, I simply do not have the time and energy to keep the library up to date. I appreciate everyone that has contributed over and used the library over the years. I encourage forking and evolving the library and of course you can just pull the source code into your project directly.
A simple In-App Purchase plugin for .NET MAUI and Windows to query item information, purchase items, restore items, and more.
Subscriptions are supported on iOS, Android, and Mac. Windows/UWP/WinUI 3 - does not support subscriptions at this time.
Get started by reading through the In-App Billing Plugin documentation.
| Platform | Version |
|---|---|
| iOS for .NET | 10+ |
| macCatlyst for .NET | All |
| Android for .NET | 21+ |
| Windows App SDK (WinUI 3) | 10+ |
| .NET MAUI | All |
AcknowledgePurchaseAsync is now FinalizePurchaseAsyncIf you receive an error in Google Play you may need to add this to your AndroidManifest.xml inside the application node:
<meta-data
android:name="com.google.android.play.billingclient.version"
android:value="X.X.X" />
Update X.X.X with the version of the Billing Library that is a dependency on the NuGet package.
To respond to pending transactions you can subscribe to a listener in your Android project startup:
// Connect to the service here
await CrossInAppBilling.Current.ConnectAsync();
// Check if there are pending orders, if so then subscribe
var purchases = await CrossInAppBilling.Current.GetPurchasesAsync(ItemType.InAppPurchase);
if (purchases?.Any(p => p.State == PurchaseState.PaymentPending) ?? false)
{
Plugin.InAppBilling.InAppBillingImplementation.OnAndroidPurchasesUpdated = (billingResult, purchases) =>
{
// decide what you are going to do here with purchases
// probably acknowledge
// probably disconnect
};
}
else
{
await CrossInAppBilling.Current.DisconnectAsync();
}
If you do connect the IsConnected propety will be true and when you make purchases or check purchases again you should check ahead of time and not re-connect or disconnect if there are pending purchases
I highly recommend reading the entire Google Play Billing System docs.
On Android if you purchase anything you must first Acknowledge a purchase else it will be refunded. See the android documentation.
https://developer.android.com/google/play/billing/integrate#process https://developer.android.com/google/play/billing/integrate#pending
For consumables, the consumeAsync() method fulfills the acknowledgement requirement and indicates that your app has granted entitlement to the user. This method also enables your app to make the one-time product available for purchase again.
So, if you have a consumable... ConsumePurchaseAsync will also acknowledge it, if you have a non-consumable you will need to call AcknowledgePurchaseAsync.
For linking if you are setting Link All you may need to add:
Plugin.InAppBilling;Xamarin.Android.Google.BillingClient
-keep class com.android.billingclient.api.** { *; }
-keep class com.android.vending.billing.** { *; }
--linkskip=Plugin.InAppBilling
The MIT License (MIT), see file.
All I have ever asked is to be active by submitting bugs, features, and sending those pull requests down! Want to go further? Make sure to subscribe to my weekly development podcast Merge Conflict, where I talk all about awesome Xamarin goodies and you can optionally support the show by becoming a supporter on Patreon.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-android36.0 net10.0-android36.0 is compatible. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-ios26.0 net10.0-ios26.0 is compatible. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-maccatalyst26.0 net10.0-maccatalyst26.0 is compatible. net10.0-macos net10.0-macos was computed. net10.0-macos26.0 net10.0-macos26.0 is compatible. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. net10.0-windows10.0.19041 net10.0-windows10.0.19041 is compatible. |
Showing the top 5 NuGet packages that depend on Plugin.InAppBilling:
| Package | Downloads |
|---|---|
|
Zebble.Billing
Zebble IAP plugin for Xamarin. |
|
|
VerticesEngine.Android
The Android port of the Cross Platform Vertices Engine. |
|
|
VerticesEngine.iOS
The iOS port of the cross platform engine Vertices Engine |
|
|
ContactManager.Core
Package Description |
|
|
RedCorners.IAP
In App Purchase Plugins |
Showing the top 2 popular GitHub repositories that depend on Plugin.InAppBilling:
| Repository | Stars |
|---|---|
|
jamesmontemagno/app-ac-islandtracker
Animal Crossing Island Tracking Mobile App
|
|
|
jamesmontemagno/MyStreamTimer
A cool app to count up or down that writes text to file for streamers
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 10.0.0 | 13,554 | 12/3/2025 | |
| 9.1.0 | 47,123 | 7/4/2025 | |
| 9.0.5-beta | 4,939 | 11/29/2024 | |
| 9.0.4-beta | 238 | 11/27/2024 | |
| 9.0.3-beta | 362 | 11/27/2024 | |
| 9.0.2-beta | 478 | 10/18/2024 | |
| 9.0.1-beta | 329 | 10/8/2024 | |
| 9.0.0-beta | 219 | 10/3/2024 | |
| 8.0.5 | 48,446 | 10/18/2024 | |
| 8.0.5-beta | 230 | 10/18/2024 | |
| 8.0.4 | 2,825 | 10/3/2024 | |
| 8.0.3-beta | 518 | 8/9/2024 | |
| 8.0.2-beta | 279 | 7/23/2024 | |
| 8.0.1-beta | 245 | 7/23/2024 | |
| 8.0.0-beta | 311 | 7/16/2024 | |
| 7.1.3 | 33,975 | 7/15/2024 | |
| 7.1.2 | 1,368 | 7/12/2024 | 7.1.2 is deprecated because it has critical bugs. |
| 7.1.2-beta | 368 | 5/11/2024 | |
| 7.1.1-beta | 3,765 | 12/13/2023 | |
| 7.1.0 | 77,795 | 10/30/2023 |