InvoicingAPI 1.1.0
dotnet add package InvoicingAPI --version 1.1.0
NuGet\Install-Package InvoicingAPI -Version 1.1.0
<PackageReference Include="InvoicingAPI" Version="1.1.0" />
<PackageVersion Include="InvoicingAPI" Version="1.1.0" />
<PackageReference Include="InvoicingAPI" />
paket add InvoicingAPI --version 1.1.0
#r "nuget: InvoicingAPI, 1.1.0"
#:package InvoicingAPI@1.1.0
#addin nuget:?package=InvoicingAPI&version=1.1.0
#tool nuget:?package=InvoicingAPI&version=1.1.0
InvoicingAPI
Description
This is a client wrapper for InvoicingAPI. InvoicingAPI is a powerful platform designed to simplify the process of creating invoices and managing your invoice payments. Create beautiful, customizable and dynamic, tax-compliant invoices with payment links built in. Get notified when you get paid.
It also creates EU e-invoices: ZUGFeRD and Factur-X PDFs, and XRechnung XML files, from the same request.
Usage
Here’s a basic example of how to use InvoicingAPI. For all available body parameters, see the API documentation.
using InvoicingAPI.Nuget;
var client = new InvoicingApiClient("__YOUR_API_KEY__");
var body = new CreateInvoiceBody
{
Template = "business3",
Color = "black",
DocumentType = "letter",
FontSize = 11,
InvoiceNumber = "3345",
IssueDate = DateTime.Now,
DueDate = DateTime.Now,
IssuerAddress = new Address
{
Name = "Jane Doe",
Email = "janedoe@outlook.com",
AddressLine1 = "Krusty Avenue 3rd",
AddressLine2 = "Business Center, Office 101",
Telephone = "94 903 9932"
},
RecipientAddress = new Address
{
Name = "John Doe",
Email = "johndoe@gmail.com",
AddressLine1 = "John Keneddy Str",
Telephone = "(034)-543-43354"
},
LineItems = new List<LineItem>
{
new LineItem
{
Description = "App consulting services", Quantity = 1, UnitPrice = 950
}
},
Currency = "usd",
Notes = "Payment Information\nIBAN Number: 43249423423489234",
IsPaid = false
};
var result = await client.CreateInvoice(body);
if (result.InvoiceByteArray != null)
{
File.WriteAllBytes($@"__PATH__\{result.FileName}", result.InvoiceByteArray);
}
else
{
Console.WriteLine(result.Error);
}
E-invoices (ZUGFeRD, Factur-X, XRechnung)
Add an EInvoice object to the same request to get an EN 16931 e-invoice:
EInvoiceFormats.ZUGFeRDorEInvoiceFormats.FacturX: the template PDF as PDF/A-3, with the e-invoice XML embedded.EInvoiceFormats.XRechnung: an XRechnung 3.0 XML file, required by German public sector buyers.
E-invoices need a city and a two-letter country code for both addresses, and the seller's VAT number. Line items can set a UnitCode (UN/ECE Rec 20, e.g. HUR for hours) and a TaxPercentage.
var body = new CreateInvoiceBody
{
Template = "business3",
Color = "black",
DocumentType = "a4",
InvoiceNumber = "2026-001",
IssueDate = DateTime.Today,
DueDate = DateTime.Today.AddDays(14),
IssuerAddress = new Address
{
Name = "Muster Software GmbH",
AddressLine1 = "Hauptstraße 1",
PostalCode = "10115",
City = "Berlin",
CountryCode = "DE",
Email = "billing@muster-software.de",
VATNo = "DE123456789"
},
RecipientAddress = new Address
{
Name = "Beispiel AG",
AddressLine1 = "Marktplatz 5",
PostalCode = "80331",
City = "München",
CountryCode = "DE",
Email = "accounts@beispiel.de"
},
TaxData = new TaxData { Type = "VAT", Percentage = 19, DisplayInline = true },
LineItems = new List<LineItem>
{
new LineItem { Description = "Software development", Quantity = 8, UnitPrice = 95, UnitCode = "HUR" }
},
Currency = "eur",
EInvoice = new EInvoiceOptions
{
Format = EInvoiceFormats.ZUGFeRD,
BuyerReference = "PO-4711",
Payment = new EInvoicePayment { Iban = "DE02120300000000202051", AccountName = "Muster Software GmbH" }
}
};
var result = await client.CreateInvoice(body);
// result.ContentType is "application/pdf" for ZUGFeRD and Factur-X, and "application/xml" for XRechnung
XRechnung also requires BuyerReference (or BuyerLeitwegId), a Payment.Iban, and the seller's ContactName, Telephone and Email. For invoices without VAT, set EInvoice.TaxCategory and EInvoice.TaxExemptionReason. See the e-invoicing guide for details.
Sandbox testing
Create a sandbox API key (it starts with test_) on your profile page. Sandbox invoices are watermarked and don't count towards your plan's limit, and result.IsSandbox is true for them.
Self-hosted InvoicingAPI
To call your self-hosted InvoicingAPI container, pass its Create Invoice endpoint to the client:
var client = new InvoicingApiClient("__YOUR_API_KEY__", "http://localhost:6000/Invoice/CreateInvoice");
Sample Output
Check out sample outputs here. More templates are on the way.
Support
If you encounter any issues or have any questions about InvoicingAPI, please contact us at support@invoicingapi.com.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
-
net10.0
- Newtonsoft.Json (>= 13.0.3)
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added e-invoices: XRechnung, ZUGFeRD and Factur-X (EInvoice options, address country code, postal code and contact name, line unit code and tax percentage). Added the GSTIN, GST/HST, P.IVA, TVA and ABN address fields, ContentType and IsSandbox on the response, and readable errors for non-JSON responses.