SLVZ.Billing.Bazaar 1.0.3

dotnet add package SLVZ.Billing.Bazaar --version 1.0.3
                    
NuGet\Install-Package SLVZ.Billing.Bazaar -Version 1.0.3
                    
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="SLVZ.Billing.Bazaar" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SLVZ.Billing.Bazaar" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="SLVZ.Billing.Bazaar" />
                    
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 SLVZ.Billing.Bazaar --version 1.0.3
                    
#r "nuget: SLVZ.Billing.Bazaar, 1.0.3"
                    
#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 SLVZ.Billing.Bazaar@1.0.3
                    
#: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=SLVZ.Billing.Bazaar&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=SLVZ.Billing.Bazaar&version=1.0.3
                    
Install as a Cake Tool

📦 SLVZ Billing Bazaar

SLVZ Billing Bazaar is a lightweight and easy-to-use .NET library for handling in-app purchases via Cafe Bazaar on Android.
It simplifies the integration of the Poolakey(Cafe Bazaar) for .NET MAUI apps without needing to write any Java code directly.


✨ Features

  • Supports both in-app purchases and subscriptions
  • Simple, async-based API
  • No extra dependencies required
  • Works with .NET MAUI
  • Secure and easy to integrate

⚙️ Installation

Install-Package SLVZ.Billing.Bazaar

⚙️ Usage Example

1. Initialize the library

using SLVZ.Billing;

List<string> products = new() { "coin_pack_1", "subscription_premium" };

InAppBilling.Initialize(this, "YOUR_RSA_KEY_HERE", products);

Initialize must be called once when the app starts (e.g., in your main Activity).

2. Purchase a product

using SLVZ.Billing;

var result =  await InAppBilling.Purchase("coin_pack_1" , "Optional payload");

if (result.Status)
    Console.WriteLine($"Purchase successful: {result.Product.productId}");
else
    Console.WriteLine("Purchase failed.");

3. Purchase a subscription

using SLVZ.Billing;

var result = wait InAppBilling.Subscription("coin_pack_1" , "Optional payload");

if (result.Status)
    Console.WriteLine("Subscription activated!");

4. All availible items to purchase

using SLVZ.Billing;

var items = await InAppBilling.AllInappItems();
var subs = await InAppBilling.AllSubItems();

It will return all subs and purchase items with details

5. Consume a product (for repeatable items)

using SLVZ.Billing;

var result = await InAppBilling.Consume(purchaseModel);


if (result.Status)
    Console.WriteLine($"Item '{result.ProductID}' Consumed");

6. Data Models (PurchaseModel)

public class PurchaseModel
{
    public string? productId { get; set; }
    public string? purchaseToken { get; set; }
    public JsonElement? state { get; set; }
    public string? payload { get; set; }
    public string? signature { get; set; }
    public string? orderId { get; set; }
    public string? originalJson { get; set; }
    public string? purchaseTime { get; set; }
    public string? type { get; set; }
}

7. ItemModel

Contains product details.

public class ItemModel
{
    public string? productId { get; set; }
    public string? description { get; set; }
    public string? price { get; set; }
    public string? title { get; set; }
    public string? type { get; set; }
}

⚠️ Notes

  • Call InAppBilling.Initialize() once before using any other methods.
  • All operations are asynchronous — make sure to use await.
  • If a purchase or subscription fails or is canceled, the returned Status will be false.
  • Always validate the purchase signature on your server to ensure transaction integrity.
  • The RSA key must match the one from your Bazaar pishkhan panel.
  • For consumable items, remember to call Consume() after a successful purchase.
  • Do not call Initialize() multiple times — the helper automatically handles initialization state.
  • Make sure to declare all your product IDs when calling Initialize().
  • All callbacks return strongly typed models (PurchaseModel, ItemModel) for simplicity.

👨‍💻 Author: SLVZ

Product Compatible and additional computed target framework versions.
.NET net10.0-android36.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0-android36.0

    • No dependencies.

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.0.3 52 10/31/2026
1.0.2 92 10/24/2026
1.0.1 93 10/24/2026
1.0.0 93 10/23/2026