MisaConnect.EInvoice
2.0.2
dotnet add package MisaConnect.EInvoice --version 2.0.2
NuGet\Install-Package MisaConnect.EInvoice -Version 2.0.2
<PackageReference Include="MisaConnect.EInvoice" Version="2.0.2" />
<PackageVersion Include="MisaConnect.EInvoice" Version="2.0.2" />
<PackageReference Include="MisaConnect.EInvoice" />
paket add MisaConnect.EInvoice --version 2.0.2
#r "nuget: MisaConnect.EInvoice, 2.0.2"
#:package MisaConnect.EInvoice@2.0.2
#addin nuget:?package=MisaConnect.EInvoice&version=2.0.2
#tool nuget:?package=MisaConnect.EInvoice&version=2.0.2
![]()
MisaConnect.EInvoice
📖 Docs: https://chukhali.github.io/MisaConnect/einvoice/
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.ESignpackage.
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
- Getting started
- Configuration reference
- Sandbox setup
- Architecture overview
- MISA API reference
- CHANGELOG
License
MIT — see LICENSE.
| Product | Versions 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. |
-
net8.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Options (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.