MisaConnect.EInvoice 2.0.2

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

MisaConnect

MisaConnect.EInvoice

📖 Docs: https://chukhali.github.io/MisaConnect/einvoice/

NuGet Downloads License: MIT

Community .NET SDK for the MISA MeInvoice (eInvoice) HTTP API. Provides a port-and-adapter facade for token acquisition, template lookup, invoice preview/save/PDF/delete, lookup, and amendments. Targets .NET 8.

Looking for digital-signature operations (PDF/XML/Word/Excel signing, 2FA/OTP, webhooks)? Install the sibling MisaConnect.ESign package.

Install

dotnet add package MisaConnect.EInvoice

Quickstart

using MisaConnect.EInvoice.Application.UseCases;
using MisaConnect.EInvoice.Infrastructure.DependencyInjection;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

var config = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .AddUserSecrets<Program>()
    .Build();

var services = new ServiceCollection();
services.AddLogging();
services.AddMisaConnectEInvoice(config);

await using var scope = services.BuildServiceProvider().CreateAsyncScope();

var listTemplates = scope.ServiceProvider.GetRequiredService<ListActiveTemplates>();
var templates = await listTemplates.ExecuteAsync(invoiceWithCode: true, CancellationToken.None);
foreach (var t in templates) Console.WriteLine($"{t.InvSeries} - {t.TemplateName}");

Configuration

Bind credentials under the Misa:EInvoice configuration section (env vars, user-secrets, or appsettings):

{
  "Misa": {
    "EInvoice": {
      "Environment": "Sandbox",
      "BaseUrl": "https://testapi.meinvoice.vn/api/integration",
      "TaxCode": "0000000000",
      "UserName": "your-misa-user",
      "Password": "your-misa-password",
      "AppId": "your-misa-app-id"
    }
  }
}

For production, switch Environment to Production and BaseUrl to https://api.meinvoice.vn/api/integration. The options validator refuses to start if the environment and base-URL host disagree.

Supported operations

Operation Use case Status
Acquire access token EnsureAccessToken v1.0
List active templates ListActiveTemplates v1.0
Preview invoice (PDF) PreviewInvoice v1.0
Save draft invoices SaveDraftInvoices v1.0
Get draft PDF by RefId GetDraftPdfByRefId v1.0
Delete draft invoice DeleteDraftInvoice v1.0
Lookup by RefId (cascade) LookupByRefIds v1.0
Lookup paginated (standard) LookupStandard v1.0
Lookup paginated (calculating) LookupCalculating v1.0
Issue replacement IssueReplacementInvoice v1.0
Issue adjustment IssueAdjustmentInvoice v1.0

Documentation

License

MIT — see LICENSE.

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
2.0.2 93 5/23/2026
2.0.1 93 5/23/2026
2.0.0 94 5/23/2026
1.1.0 95 5/14/2026
1.0.0 94 5/14/2026