node-zugferd
IntroductionInstallation

ZUGFeRD

Minimum
Basic WL
Basic
EN 16931
Extended
XRechnung

Order-X

Basic
Comfort

Basic WL

This includes the profile MINIMUM plus some additional data which is typically required for process automation on the buyer’s side. Such data may be optional or conditional, depending on the underlying business transaction. This profile does not include any invoice information at line level, but it contains all mandatory fields on document level, including those on which business rules from the EN 16931 may apply.

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/basic-wl@beta

Setup the Profile

Register the profile when creating your zugferd instance:

lib/invoicer.ts
import { basicWL } from "@node-zugferd/basic-wl";
import { zugferd } from "node-zugferd";

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

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.BasicWL = {
  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("basic-wl", data);

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

Schema

  • BG-0

    Invoice

    1..1


 

llms.txt
Minimum

Basic

Edit on GitHubPrivacyImprint

On this page

Basic UsageInstall the ProfileSetup the ProfileDefine Invoice DataGenerate InvoiceSchema

How is this guide?