In UBL a credit note is a distinct <CreditNote> document and an invoice an <Invoice>. The document type code (BT-3) must come from the matching UNTDID 1001 list — the most common error is code 381 (credit note) in an <Invoice> instead of a <CreditNote>.
For a credit note emit a <CreditNote> document (CreditNoteTypeCode/CreditNoteLine), not an <Invoice> with type 381. Conversely, invoice codes (e.g. 380) belong in an <Invoice>.
The Billhorse validator checks XRechnung, ZUGFeRD and Factur-X right in your browser — your file is never uploaded.
Open the validator← All validation rules
Rule source: EN 16931 / XRechnung (KOSIT) or Billhorse check (BH-*).