Regira.Invoicing 6.5.0

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

Regira Invoicing

Regira Invoicing covers electronic invoice creation, UBL/Peppol conversion, and document transmission via an AP gateway.

Projects

Project Package Purpose
Common.Invoicing Regira.Invoicing Shared abstractions
Invoicing.Billit Regira.Invoicing.Billit Create and send invoices via Billit
Invoicing.UblSharp Regira.Invoicing.UblSharp Convert invoices to UBL XML (Peppol BIS)
Invoicing.ViaAdValvas Regira.Invoicing.ViaAdValvas Transmit UBL documents via AdValVas AP gateway

Installation

<PackageReference Include="Regira.Invoicing.Billit"       Version="6.*" />
<PackageReference Include="Regira.Invoicing.UblSharp"     Version="6.*" />
<PackageReference Include="Regira.Invoicing.ViaAdValvas"  Version="6.*" />

Billit

BillitConfig

Property Type Description
PartyId string? Your Billit party ID
Api.BaseUrl string? Billit API base URL
Api.Key string? API key

DI Registration

using Regira.Invoicing.Billit.Config;                // BillitConfig
using Regira.Invoicing.Billit.DependencyInjection;   // AddBillit

services.AddBillit(sp => new BillitConfig
{
    PartyId = configuration["Billit:PartyId"],
    Api     = new() { BaseUrl = configuration["Billit:Api:Url"], Key = configuration["Billit:Api:Key"] }
});
// Registers: IInvoiceManager, IFileManager, IPartyManager, IPeppolManager

IInvoiceManager

Task<ICreateInvoiceResult> Create(IInvoice item);
Task<ISendInvoiceResult>   Send(params string[] ids);    // send by IDs
Task<ISendInvoiceResult>   Send(IInvoice input);          // creates the invoice, then sends it

UblSharp — UBL Conversion

IUblConverter

XDocument Convert(UblDocumentInput input);

Produces a UBL 2.1 Invoice document.

IInvoice invoice = new Invoice { /* lines, parties, tax, etc. */ };

var converter = new UblConverter();
XDocument ubl = converter.Convert(new UblDocumentInput
{
    Invoice  = invoice,            // required
    Supplier = invoice.Supplier    // the seller: read from here only, never from Invoice
});

UblDocumentInput takes the Invoice (required), the Supplier and optional PaymentConditions, written as the payment terms note. The converter writes AccountingSupplierParty from Supplier alone, so a document converted without it has no seller, which Peppol validation refuses (EN 16931 rule BR-06).

What the converter writes

Some fields are fixed rather than taken from the invoice:

  • Customization ID and Profile ID from UblConstants: Peppol BIS Billing 3.0
  • Invoice type code 380, a commercial invoice, for every document. IInvoice.InvoiceType is not read, so the converter writes no credit notes
  • Currency EUR
  • Payment means 1 (not defined), with RemittanceInfo as the payment ID
  • Tax category S (standard rate) on every line

ViaAdValvas — Peppol Transmission

GatewaySettings

Property Type Description
Uri string AdValVas gateway endpoint
SenderID string Your Peppol participant ID
SenderName string Display name
Token string API token
SecretKey string Secret key included in the request seal
IsProduction bool Not read: PeppolService posts to Uri, so point Uri at the test or the production gateway

PeppolService

var service = new PeppolService(gatewaySettings, jsonSerializer);

try
{
    // returns only once the gateway accepted the document, so result.Success is always true here
    UblDocumentResponse result = await service.Send(ublDocument);
    Console.WriteLine($"Sent. Reference: {result.Reference}");
}
catch (PeppolRequestException ex)    // the gateway answered with a non-2xx status
{
    Console.WriteLine($"Rejected ({ex.ServiceStatusCode}): {ex.ResponseContent}");
}
catch (PeppolResponseException ex)   // it answered, but did not accept the document
{
    Console.WriteLine($"Not sent: {ex.SerializedResponse}");
}

PeppolRequestException and PeppolResponseException are in Regira.Invoicing.ViaAdValvas.Models.

Requests are sealed with SealUtility.Generate() — an MD5 digest over the token, sender ID, reference ID, date, and the secret key: a plain hash with the secret appended, not an HMAC.


Typical end-to-end flow

// 1. Build the invoice domain model
IInvoice invoice = BuildInvoice(order);

// 2. Convert to UBL XML
XDocument ubl = new UblConverter().Convert(new UblDocumentInput { Invoice = invoice, Supplier = invoice.Supplier });

// 3. Transmit via Peppol
var result = await peppolService.Send(ubl);

// 4. (Optional) also create in Billit for accounting, then send the invoice it created
var created = await invoiceManager.Create(invoice);
await invoiceManager.Send(created.InvoiceId);

License

Apache License 2.0 — this package contains no license validation and no runtime limits. See LICENSE. A few companion packages are commercially licensed with a free tier; see the licensing overview.

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 (5)

Showing the top 5 NuGet packages that depend on Regira.Invoicing:

Package Downloads
Regira.Invoicing.Billit

Billit API integration for invoicing in Regira.

Regira.Invoicing.UblSharp

UBL (Universal Business Language) invoice serialization using UblSharp for Regira.

Regira.Invoicing.ViaAdValvas

ViaAdValvas integration for electronic invoicing in Regira.

Regira.Payments.Pom

POM payment integration for Regira.

Regira.Payments.Mollie

Mollie payment gateway integration for Regira.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.5.0 0 10/4/2026
6.4.0 188 9/26/2026
6.3.3 169 9/22/2026
6.3.2 172 9/19/2026
6.3.1 182 9/17/2026
6.2.1 197 9/5/2026
6.1.3 217 8/26/2026
6.1.2 220 8/16/2026
6.1.1 203 8/12/2026
6.1.0 198 8/10/2026