node-zugferd
IntroductionInstallation

ZUGFeRD

Minimum
Basic WL
Basic
EN 16931
Extended
XRechnung

Order-X

Basic
Comfort

Minimum

This profile contains the minimum of data which must be present in the structured data file, some of which may depend on the data being actually available, like the supplier's intra-community VAT identifier number which is mandatory if the supplier has one.

Documents containing only information of the first two profiles (MINIMUM and BASIC WL) are not considered to be invoices according to German fiscal law (→ GoBD); they may therefore not be used as electronic invoices in Germany. They will not be considered as invoices in France anymore once the einvoicing B2B mandate CTC reform has been fully deployed (2028). It is then highly recommended to target the BASIC profile at minimum.

Basic Usage

Install the Profile

npm install @node-zugferd/minimum@beta

Setup the Profile

Register the profile when creating your zugferd instance:

lib/invoicer.ts
import { minimum } from "@node-zugferd/minimum";
import { zugferd } from "node-zugferd";

export const invoicer = zugferd({
  profiles: [minimum], 
});

Define Invoice Data

Provide invoice data that satisfies the requirements of this profile.

data.ts
import type { invoicer } from "@/lib/invoicer";

const data: typeof invoicer.$Infer.Input.Minimum = {
  exchangedDocument: {
    invoiceNumber: "471102",
    // ...
  },
  // ...
};

Generate Invoice

Create the invoice and embed it into a PDF/A document or serialize it for further processing.

invoice.ts
import { invoicer } from "@/lib/invoicer";
import { data } from "./data";
import { readFile } from "node:fs/promises";

const invoice = await invoicer.create("minimum", data);

const xml = invoice.toXML();
const pdfA = await invoice.toPDF(
  await readFile("./my-invoice.pdf"),
);

Schema

  • BG-0

    Invoice

    1..1


 

llms.txt
Installation

Getting started with node-zugferd

Basic WL

Edit on GitHubPrivacyImprint

On this page

Basic UsageInstall the ProfileSetup the ProfileDefine Invoice DataGenerate InvoiceSchema

How is this guide?