Fayda.IdNetSdk 1.0.2

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

IDA .NET SDK

.NET SDK for Fayda IDA (Identity Authentication) services. Provides a simple and intuitive interface for OTP generation, Yes/No authentication, and eKYC (Electronic Know Your Customer) operations.

Features

  • OTP Management: Request and validate OTPs for Fayda ID verification
  • Yes/No Authentication: Perform authentication using OTP challenges
  • eKYC Services: Retrieve verified identity details securely
  • Cryptographic Security: Supports RSA-OAEP encryption, AES-GCM decryption, and JWT signing/verification
  • PKCS12 Key Support: Secure key and certificate management using PKCS12 keystores
  • Flexible Configuration: Supports environment variables and programmatic configuration
  • Robust Reliability: Comprehensive error handling, logging, and response validation

Designed for seamless integration with .NET applications interacting with Fayda IDA services.

Requirements

  • .NET 8.0 or later
  • PKCS12 key files for signing requests

Installation

NuGet Package

dotnet add package Fayda.IdNetSdk

Manual Installation

  1. Clone or download this repository
  2. Add a project reference to IdNetSdk.csproj
  3. Ensure you have the required dependencies (automatically included via NuGet)

Configuration

The SDK can be configured using environment variables or a configuration dictionary:

Environment Variables

  • PARTNER_ID: Your partner ID
  • FAYDA_BASE_URL: Base URL for Fayda API
  • MISP_LICENSE_KEY: MISP license key
  • PARTNER_API_KEY: Partner API key
  • IDA_REFERENCE_ID: IDA reference ID
  • P12_PATH: Path to directory containing PKCS12 key files
  • P12_PASSWORD: Password for PKCS12 files
  • IDA_SSL_VERIFY: Set to "true" to verify SSL certificates (default: "false")

Configuration Dictionary

Alternatively, you can provide configuration via a dictionary:

var config = new Dictionary<string, object?>
{
    ["partnerId"] = "your-partner-id",
    ["fayda.base.url"] = "https://api.fayda.et",
    ["mispLicenseKey"] = "your-license-key",
    ["partnerApiKey"] = "your-api-key",
    ["ida.reference.id"] = "your-reference-id",
    ["p12.path"] = "path/to/keys",
    ["p12.password"] = "your-password",
    ["ida.ssl.verify"] = false
};

Usage

Basic Example

using IdNetSdk.Client;
using IdNetSdk.Dto.Request;

// Initialize client with configuration
var config = new Dictionary<string, object?>
{
    // ... configuration as shown above
};

var client = new EkycClient(config);

// Request OTP
var otpRequest = new OtpRequestDto
{
    IndividualId = "1234567890123456",
    IndividualIdType = "FAN",
    OtpChannel = new[] { "email", "phone" }
};

var otpResponse = await client.RequestOtpAsync(otpRequest);

// Perform Yes/No Auth
var authRequest = new AuthRequestDto
{
    IndividualId = "1234567890123456",
    IndividualIdType = "FAN",
    Otp = "123456"
};

var authResponse = await client.YesNoAuthAsync(authRequest);

// Perform eKYC
var ekycRequest = new AuthRequestDto
{
    IndividualId = "1234567890123456",
    IndividualIdType = "FAN",
    Otp = "123456"
};

var ekycResponse = await client.PerformEkycAsync(ekycRequest);

Publishing to NuGet

  1. Bump the version in IdNetSdk.csproj: set <Version> (and optionally <PackageReleaseNotes>) to the new release (for example 1.0.2).

  2. Restore and pack from the repository root:

    dotnet restore IdNetSdk.csproj
    dotnet pack IdNetSdk.csproj -c Release -o ./artifacts
    

    This produces artifacts/Fayda.IdNetSdk.<version>.nupkg and a matching .snupkg symbols package if you keep symbol packages enabled.

  3. Push with your NuGet API key (create one at nuget.org with scope Push for Fayda.IdNetSdk or the whole account):

    dotnet nuget push artifacts/Fayda.IdNetSdk.<version>.nupkg --api-key <YOUR_API_KEY> --source https://api.nuget.org/v3/index.json
    

    Optionally push the symbol package (*.snupkg) the same way so consumers get better debugging.

  4. Verify on nuget.org after indexing (usually a few minutes).

Consumers upgrade with:

dotnet add package Fayda.IdNetSdk --version <version>

License

MIT License

Support

For issues and questions, please contact the api_support@id.et.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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.0.2 114 4/3/2026
1.0.1 268 12/15/2025
1.0.0 267 12/15/2025

Version 1.0.2: Unique 10-digit transaction IDs (NormalizeTransactionId) for OTP, auth, and eKYC; deprecated hard-coded default. IdNet.Api: load IdNetSdk.Api/.env first; optional MISP_LICENSE_KEY alias mispLicenseKey.