Skip to main content

Installation

Install the C# client library using the NuGet Package Manager:
Terminal
dotnet add package Solifyn
Or clone directly from the GitHub repository:
Terminal
git clone https://github.com/solifyn/solifyn-csharp.git

Quickstart

Configure the Configuration object with your API access token and pass it to the API endpoint class.
Program.cs
using Solifyn.Api;
using Solifyn.Client;
using Solifyn.Model;
using System;

// Set up client configuration
var config = new Configuration();
config.BasePath = "https://api.solifyn.com"; // Optional: defaults to http://localhost:8000
config.AccessToken = "YOUR_API_KEY";          // Replace with your actual Solifyn API key

// Instantiate the Products API client
var productsApi = new ProductsApi(config);

try
{
    // Retrieve list of products
    var result = productsApi.ProductsList();
    Console.WriteLine(result);
}
catch (ApiException e)
{
    Console.WriteLine("Exception when calling ProductsApi.ProductsList: " + e.Message);
    Console.WriteLine("Status Code: " + e.ErrorCode);
}

API Classes

APIs are organized into separate namespace classes under Solifyn.Api:
  • Solifyn.Api.ProductsApi - Manage products and addons
  • Solifyn.Api.LicenseApi & Solifyn.Api.LicenseKeysApi - Administer license key records
  • Solifyn.Api.LicenseKeysClientApi - Validate (LicensesVerify) and activate (LicensesActivate) license keys on client applications
  • Solifyn.Api.CheckoutApi - Generate checkout sessions
  • Solifyn.Api.CheckoutLinksApi - Generate payment checkout links
  • Solifyn.Api.CustomersApi - Retrieve and manage customer profiles
  • Solifyn.Api.CollectionsApi - Group products in collections
  • Solifyn.Api.SubscriptionsApi - Manage subscription actions
  • Solifyn.Api.DiscountsApi - Create and validate discount coupon codes
  • Solifyn.Api.MetersApi - Ingest usage metric events
  • Solifyn.Api.DeveloperApi - Manage API keys and webhooks
  • Solifyn.Api.DigitalFileApi - Handle digital deliveries
  • Solifyn.Api.DisputesApi - Review and upload transaction dispute evidence
  • Solifyn.Api.OrdersApi - Invoices and customer purchases