Docs

Profiles

Minimum

This profile contains the minimum required data, some dependent.

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.

import { MINIMUM, type ProfileMinimum } from "node-zugferd/profile/minimum";
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

Setup the Profile

First configure the zugferd instance (invoicer) to use the Minimum profile. This defines the standard and complexity level of the invoice.

invoicer.ts
import { MINIMUM } from "node-zugferd/profile/minimum"; 

export const invoicer = zugferd({
  profile: MINIMUM, 
});

Define Invoice Data

Now define the actual invoice content, including all required fields of the profile, using the ProfileMinimum type for type safety.

import { ProfileMinimum } from "node-zugferd/profile/minimum";

const data: ProfileMinimum = {
  number: "INV-001",
  // ...
};

Create Invoice

Use the previously created instance (invoicer) to generate the invoice from your data. You can either:

  • Generate standalone XML
  • Embed the XML inside a PDF/A-3b compliant file.
import fs from "fs";
import { invoicer } from "./invoicer";

const invoice = invoicer.create(data);

// Only generate xml
const xml = await invoice.toXML();

// Or embed xml in a PDF-A/3b
const pdf = fs.readFileSync("./your/invoice.pdf");
const pdfA = await invoicer.embedInPdf(pdf); 

🎉 That's it

Your invoice is now ready! You've successfully created a ZUGFeRD invoice using the Minimum profile.

Schema

Type:string
Required:
ram:ID

Business process type

Identifies the business process context in which the transaction appears, to enable the Buyer to process the Invoice in an appropriate way.

To be specifid by the Buyer.

CHORUSPRO: this data makes it possible to inform the "cadre de facturation" (billing framework, which could be invoice from agent, co-contractor, subcontractor, invoicing part of a public works contract, etc.). The codes to be used are defined in the CHORUSPRO specifications: A1 (invoice deposit), A2 (prepaid invoice deposit), ... By default (in the absence of this field), the case A1 is applied.

Type:string
Required:
ram:ID

Specification Identifier A specification identifier containing the entire set of rules regarding semantic content, cardinalities, and business rules to which the data contained in the invoice conforms.

Note: This declares conformity to the respective document.

For the reference to the EU standard, "urn:cen.eu:en16931:2017" must be specified.

Invoices that are compliant with CIUS XRechnung should specify "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0" here.

Invoices that comply with the XRechnung extension should specify "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0#conformant#urn:xeinkauf.de:kosit:extension:xrechnung_3.0" here. No schema is required.

Type:string
Required:
ram:ID

Invoice number

A unique identification of the Invoice.

The sequential number required in Article 226(2) of the directive 2006/112/EC [2], to uniquely identify the Invoice within the business context, time-frame, operating systems and records of the Seller . It may be based on one or more series of numbers, which may include alphanumeric characters. No identification scheme is to be used.

CHORUSPRO: the invoice number is limited to 20 characters

BR-2: An Invoice shall have an Invoice number (BT-1).

Type:string
Required:
ram:TypeCode

Invoice type code

A code specifying the functional type of the Invoice.

Commercial invoices and credit notes are defined according the entries in UNTDID 1001 [6]. Other entries of UNTDID 1001 [6] with specific invoices or credit notes may be used if applicable.

The types of documents used are:

  • 380: Commercial Invoice
  • 381: Credit note
  • 384: Corrected invoice
  • 389: Self-billied invoice (created by the buyer on behalf of the supplier)
  • 261: Self billed credit note (not accepted by CHORUSPRO)
  • 386: Prepayment invoice
  • 751: Invoice information for accounting purposes (not accepted by CHORUSPRO)

BR-4: An Invoice shall have an Invoice type code (BT-3).

Type:date
Required:
udt:DateTimeString

Invoice issue date

The date when the Invoice was issued.

CHORUSPRO: the issue date must be before or equal to the deposit date.

Type:object
Required:

Grouping of information about the business transaction

Type:object
Required:

Grouping of contract information

Type:string
Required:
ram:BuyerReference

Buyer reference

An identifier assigned by the Buyer used for internal routing purposes.

The identifier is defined by the Buyer (e.g. contact ID, department, office id, project code), but provided by the Seller in the Invoice.

CHORUS PRO: for the public sector, it is the "Service Exécutant". It is mandatory for some buyers. It must belong to the Chorus Pro repository. It is limited to 100 characters.

Type:object
Required:

A group of business terms providing information about the Seller.

Type:string
Required:
ram:Name

Seller name

The full formal name by which the Seller is registered in the national registry of legal entities or as a Taxable person or otherwise trades as a person or persons.

Type:object
Required:

Details about the organization

Type:object
Required:

Seller legal registration identifier

An identifier issued by an official registrar that identifies the Seller as a legal entity or person.

If no identification scheme is specified, it must be known by Buyer and Seller.

Type:string
Required:
ram:ID

Seller legal registration identifier

An identifier issued by an official registrar that identifies the Seller as a legal entity or person.

If no identification scheme is specified, it must be known by Buyer and Seller.

Type:string
Required:
@schemeID

Scheme identifier

The identification scheme identifier of the Seller legal registration identifier.

If used, the identification scheme shall be chosen from the entries of the list published by the ISO/IEC 6523 maintenance agency.

For a SIREN or a SIRET, the value of this field is "0002"

Type:object
Required:

Seller Address

A group of business terms providing information about the address of the Seller.

Sufficient components of the address are to be filled in order to comply to legal requirements.

Like any address, the fields necessary to define the address must appear. The country code is mandatory.

BR-8: An Invoice shall contain the Seller postal address (BG-5).

Type:string
Required:
ram:CountryID

Seller country code

A code that identifies the country.

If no tax representative is specified, this is the country where VAT is liable. The lists of valid countries are registered with the ISO 3166-1 Maintenance agency, "Codes for the representation of names of countries and their subdivisions".

Type:object
Required:

Detailed information on tax information of the seller

Type:string
Required:
ram:ID

Seller VAT identifier

The Seller's VAT identifier (also known as Seller VAT identification number).

VAT number prefixed by a country code. A VAT registered Supplier shall include his VAT ID, except when he uses a tax representative.

Type:string
Required:
ram:ID

Seller tax registration identifier

The local identification (defined by the Seller’s address) of the Seller for tax purposes or a reference that enables the Seller to state his registered tax status.

This information may affect how the Buyer settles the payment (such as for social security fees). E.g. in some countries, if the Seller is not registered as a tax paying entity then the Buyer is required to withhold the amount of the tax and pay it on behalf of the Seller.

Type:object
Required:

A group of business terms providing information about the Buyer.

Type:string
Required:
ram:Name

Buyer name

The full name of the Buyer.

CHORUS PRO: this field is limied to 99 characters.

BR-7: An Invoice shall contain the Buyer name (BT-44).

Type:object
Required:

Details about the organization

Type:object
Required:

Buyer legal registration identifier

An identifier issued by an official registrar that identifies the Buyer as a legal entity or person.

If no identification scheme is specified, it should be known by Buyer and Seller, e.g. the identifier that is exclusively used in the applicable legal environment.

CHORUSPRO: the identifier of the buyer (public entity) is mandatory and is always a SIRET number

Type:string
Required:
ram:ID

Buyer legal registration identifier

An identifier issued by an official registrar that identifies the Buyer as a legal entity or person.

If no identification scheme is specified, it should be known by Buyer and Seller, e.g. the identifier that is exclusively used in the applicable legal environment.

CHORUSPRO: the identifier of the buyer (public entity) is mandatory and is always a SIRET number

Type:string
Required:
@schemeID

Scheme identifier

The identification scheme identifier of the Buyer legal registration identifier.

If used, the identification scheme shall be chosen from the entries of the list published by the ISO 6523 maintenance agency.

For a SIREN or a SIRET, the value of this field is "0002"

Type:object
Required:

Details of the associated order

Type:string
Required:
ram:IssuerAssignedID

Purchase order reference

An identifier of a referenced purchase order, issued by the Buyer.

CHORUS PRO: for the public sector, this is the "Engagement Juridique" (Legal Commitment). It is mandatory for some buyers. You should refer to the ChorusPro Directory to identify these public entity buyers that make it mandatory.

Type:object
Required:
ram:ApplicableHeaderTradeDelivery

Grouping of delivery details

Type:object
Required:

Direct Debit

A group of business terms to specify a direct debit.

This group may be used to give prior notice in the invoice that payment will be made through a SEPA or other direct debit initiated by the Seller, in accordance with the rules of the SEPA or other direct debit scheme.

CHORUS PRO : not used

Type:string
Required:
ram:InvoiceCurrencyCode

Invoice currency code

The currency in which all Invoice amounts are given, except for the Total VAT amount in accounting currency.

Only one currency shall be used in the Invoice, except for the Total VAT amount in accounting currency (BT-111) in accordance with article 230 of Directive 2006/112/EC on VAT. The lists of valid currencies are registered with the ISO 4217 Maintenance Agency "Codes for the representation of currencies and funds".

CHORUS PRO: Invoices and credit notes or Chorus Pro are mono-currencies only.

BR-5: An Invoice shall have an Invoice currency code (BT-5).

Type:object
Required:

Document Totals

A group of business terms providing the monetary totals for the Invoice.

CHORUS PRO: Amounts in an invoice are expressed by a figure on 19 positions. They can not have more than two decimals. The separator is ". "

Type:string | number
Required:
ram:TaxBasisTotalAmount

Invoice total amount without VAT

The total amount of the Invoice without VAT.

The Invoice total amount without VAT is the Sum of Invoice line net amount minus Sum of allowances on document level plus Sum of charges on document level.

For EXTENDED profile only, BR-CO-13 is replaced by BR-FXEXT-CO-13, which add a tolerance of 0,01 euro per line, document level charge and allowance in calculation.

Type:object
Required:

Invoice total VAT amount

The total VAT amount for the Invoice.

The Invoice total VAT amount is the sum of all VAT category tax amounts.

Type:string | number
Required:
ram:TaxTotalAmount[0]

Invoice total VAT amount

The total VAT amount for the Invoice.

The Invoice total VAT amount is the sum of all VAT category tax amounts.

Type:string
Required:
@currencyID

Invoice currency code

Type:string | number
Required:
ram:GrandTotalAmount

Invoice total amount with VAT

The total amount of the Invoice with VAT.

The Invoice total amount with VAT is the Invoice total amount without VAT plus the Invoice total VAT amount.

Type:string | number
Required:
ram:DuePayableAmount

Amount due for payment

The outstanding amount that is requested to be paid.

This amount is the Invoice total amount with VAT minus the paid amount that has been paid in advance. The amount is zero in case of a fully paid Invoice. The amount may be negative; in that case the Seller owes the amount to the Buyer.