MisaConnect.EInvoice 2.10.0

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

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.

TaxCode is the bare tax code, without the AppID. MISA often hands out credentials as a "Mã số thuế" such as 6868686868-267, which is <TaxCode>-<AppId>. In that case set TaxCode to 6868686868 and AppId to 267. The SDK sends <TaxCode>-<AppId> itself. If you pass the combined value, MISA's token endpoint answers INVALID_TAXCODE.

Calling MISA from outside Vietnam

Measured from GitHub-hosted runners (2026-11-03), the network path to testapi.meinvoice.vn is a path-MTU blackhole: TCP segments near 1500 bytes are dropped, and the ICMP message that would make the sender shrink them never arrives. Any request larger than about 1.4 KB hangs until HttpClient.Timeout (100 s by default). That includes every authenticated call, because the bearer token alone is about 2 KB. The sign-in call is small and still succeeds, so the failure looks like a slow or flaky MISA. curl shows the same behaviour, so this is not specific to .NET and the SDK cannot work around it.

Hosts in Vietnam are not affected. Elsewhere, lower the MTU of the network interface that reaches MISA, e.g. ip link set dev eth0 mtu 1280 on Linux. This repository's sandbox CI (integration.yml) does exactly that. Before the change, 14 sandbox tests timed out; after it, all of them passed. Enabling TCP MTU probing (sysctl -w net.ipv4.tcp_mtu_probing=1) may also help, but it has not been tested against MISA.

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 is compatible.  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.10.0 134 11/7/2026
2.9.0 97 11/7/2026
2.8.0 80 11/7/2026
2.7.1 89 11/7/2026
2.7.0 108 11/6/2026 2.7.0 is deprecated because it has critical bugs.
2.6.0 111 11/6/2026 2.6.0 is deprecated because it has critical bugs.
2.5.0 92 11/5/2026
2.4.0 105 11/4/2026
2.3.0 3,675 7/13/2026
2.2.0 157 6/14/2026
2.1.1 140 6/14/2026
2.1.0 131 6/13/2026
2.0.2 127 5/23/2026
2.0.1 120 5/23/2026
2.0.0 129 5/23/2026
1.1.0 124 5/14/2026
1.0.0 121 5/14/2026