Iaphub 1.1.2

dotnet add package Iaphub --version 1.1.2
                    
NuGet\Install-Package Iaphub -Version 1.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Iaphub" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Iaphub" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="Iaphub" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Iaphub --version 1.1.2
                    
#r "nuget: Iaphub, 1.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Iaphub@1.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Iaphub&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=Iaphub&version=1.1.2
                    
Install as a Cake Tool

IAPHUB - .NET In-App Purchase SDK

NuGet

The easiest way to monetize your iOS and Android .NET apps by selling in-app purchases.

Features

  • 🚀 Easy Integration - Simple API for managing in-app purchases
  • 📱 Cross-Platform - Works with .NET MAUI, Avalonia, and other .NET frameworks
  • 🍎 iOS Support - Full StoreKit V1 and V2 integration
  • 🤖 Android Support - Full Google Play Billing Library integration
  • 💰 Multiple Product Types - Consumables, non-consumables, and subscriptions
  • 🔄 Receipt Validation - Server-side receipt validation through IAPHUB
  • 📊 Analytics - Built-in analytics and insights

Supported Platforms

  • iOS: iOS 13.0+
  • Android: API Level 24+
  • Frameworks: .NET MAUI, Avalonia, and other .NET 9+ / .NET 10+ frameworks

Installation

Install via NuGet Package Manager:

dotnet add package Iaphub

Or via Package Manager Console:

Install-Package Iaphub

Getting Started

Please refer to our Quickstart Guide for step-by-step instructions on integrating IAPHUB into your .NET app.

You can also learn all about our SDK methods in our comprehensive SDK Reference.

Quick Start

For better testability and state management, we recommend wrapping the SDK in a service class:

using System.Collections.ObjectModel;

public interface IStoreService
{
    ObservableCollection<IaphubProduct> ProductsForSale { get; }
    ObservableCollection<IaphubActiveProduct> ActiveProducts { get; }

    Task InitializeAsync();
    Task<IaphubReceiptTransaction> BuyAsync(string sku);
    Task RestoreAsync();
    Task LoginAsync(string userId);
    Task LogoutAsync();
}

public class StoreService : IStoreService
{
    private readonly SemaphoreSlim _refreshLock = new(1, 1);

    public ObservableCollection<IaphubProduct> ProductsForSale { get; } = new();
    public ObservableCollection<IaphubActiveProduct> ActiveProducts { get; } = new();

    public async Task InitializeAsync()
    {
        await IaphubSdk.StartAsync(
            // Found in IAPHUB dashboard
            appId: "your-app-id",
            // Found in IAPHUB dashboard
            apiKey: "your-api-key",
            // Set to true to allow purchases without user login
            allowAnonymousPurchase: false,
            // Enable StoreKit V2 (recommended, requires App Store Server API configuration)
            enableStorekitV2: true
        );

        IaphubSdk.OnUserUpdate += async (s, e) => await RefreshProductsAsync();

        await RefreshProductsAsync();
    }

    private async Task RefreshProductsAsync()
    {
        if (!await _refreshLock.WaitAsync(0)) return;

        try
        {
            var products = await IaphubSdk.GetProductsAsync();

            ProductsForSale.Clear();
            foreach (var product in products.ProductsForSale)
                ProductsForSale.Add(product);

            ActiveProducts.Clear();
            foreach (var product in products.ActiveProducts)
                ActiveProducts.Add(product);
        }
        finally
        {
            _refreshLock.Release();
        }
    }

    public Task<IaphubReceiptTransaction> BuyAsync(string sku) => IaphubSdk.BuyAsync(sku);
    public Task RestoreAsync() => IaphubSdk.RestoreAsync();
    public Task LoginAsync(string userId) => IaphubSdk.LoginAsync(userId);

    public async Task LogoutAsync()
    {
        await IaphubSdk.LogoutAsync();
        ProductsForSale.Clear();
        ActiveProducts.Clear();
    }
}

Then register it in your DI container:

// MAUI (MauiProgram.cs)
builder.Services.AddSingleton<IStoreService, StoreService>();

Make sure to call InitializeAsync() when your app starts.

Requirements

  • .NET 9.0 or .NET 10.0 or later
  • An IAPHUB account (sign up at iaphub.com)

Support

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-android35.0 is compatible.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-ios26.0 is compatible.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2 200 12/22/2025
1.1.0 235 12/15/2025
1.0.0 187 11/27/2025