Skip to content

Error

FX-SCH-A-000020: Give exactly one document type code

In short

Error: fails the selected checks.

FX-SCH-A-000020 means the document header contains no ram:TypeCode element for the document type (BT-3), or contains more than one. Set the correct document type and ensure your export writes that element exactly once.

On this page

What it means

Within rsm:ExchangedDocument, the test requires exactly one ram:TypeCode. Examples of document types are invoice (380), credit note (381) and self-billed invoice (389). This test counts elements; it does not check whether their code is allowed.

Why it matters

The document type tells the recipient what kind of document you have issued, so an invoice can be distinguished from a credit note or self-billed invoice.

How to fix it

Check that the document type matches the actual document. Correct the export so rsm:ExchangedDocument contains exactly one ram:TypeCode with the appropriate code. Export again and recheck the file.

Once the file is corrected, check it again for free: Validate a ZUGFeRD invoice

Or fix the invoice in a form and download the corrected file, for 1 credit: Fix a rejected e-invoice Beta

The rule as published

Element 'ram:TypeCode' must occur exactly 1 times.

Where this rule applies

Rule set Version
Factur-X 1.09 MINIMUM 1.0.9-2
Factur-X 1.09 BASIC WL 1.0.9-2
Factur-X 1.09 BASIC 1.0.9-2
Factur-X 1.09 EN 16931 1.0.9-2
Factur-X 1.09 EXTENDED 1.0.9-2
ZUGFeRD 2.5 MINIMUM 2.5.2
ZUGFeRD 2.5 BASIC WL 2.5.2
ZUGFeRD 2.5 BASIC 2.5.2
ZUGFeRD 2.5 EN 16931 2.5.2
ZUGFeRD 2.5 EXTENDED 2.5.2
Rule text from phive-rules 4.6.4.

Check your file

Drop your e-invoice to see whether FX-SCH-A-000020 still fails, and which other rules do.

Updated 8 November 2026