Romania RO e-Factura Credit Note (UBL)
Romanian RO e-Factura credit note (UBL, CIUS-RO)
A Romanian RO e-Factura credit note, checked against the UBL 2.1 CreditNote schema and the CIUS-RO rules (EN 16931 and BR-RO-*) the Ministry of Finance publishes for ANAF's validator.
About
Invoices between businesses established in Romania go through RO e-Factura, the national e-invoicing system run by ANAF: for public buyers since July 2022, between businesses since 2024 and to consumers since 1 January 2025. An invoice is uploaded within five calendar days of its issue, and the original is the XML with the Ministry of Finance seal.
The XML follows EN 16931 with the Romanian CIUS (CIUS-RO), in UBL 2.1 or CII. The CIUS-RO rules (BR-RO-*) check what Romania adds: the specification identifier, the allowed invoice type codes, VAT accounted in RON when the invoice is in another currency, addresses with county codes (ISO 3166-2:RO) and Bucharest sectors, the seller's and buyer's identifiers, dates written as YYYY-MM-DD and maximum lengths of text fields.
E-invoicing in Romania: the rules in short and how to check an invoice →
Good to know
- Rules run only when the document matches the schema. Documents over 50 MB are checked against the schema only.
- The rules are the Ministry's validation artefacts 1.0.9 (valid from 5 June 2024), as ANAF's own validator runs them: its EN 16931 rules with the Romanian changes, the code lists and the CIUS-RO rules, in one set. The CIUS-RO messages are in Romanian and English.
- ANAF publishes the CIUS-RO rules for UBL only; CII invoices are accepted by RO e-Factura, but their rules are not published, so they are not offered here.
- ANAF's validator also checks the seller's and buyer's tax codes (CUI, CNP or NIF and their check digits) outside the published rules. We check them the same way (XV-RO-*, our rules, compared with ANAF's validator on 119 documents). RO e-Factura also checks an uploaded invoice against ANAF's records, which is not done here.
- The example is the Ministry's UBL credit note example with the current specification identifier (CIUS-RO:1.0.1) and seller and buyer tax codes (CUI) with valid check digits: as published, it names 1.0.0, which the current rules reject (BR-RO-001), and ANAF's validator rejects its tax codes. It passes ANAF's validator as changed.
Files
14 files · 2.7 MB-
maindoc/UBL-CreditNote-2.1.xsd main
-
common/UBL-CommonAggregateComponents-2.1.xsd
-
common/UBL-CommonBasicComponents-2.1.xsd
-
common/UBL-CommonExtensionComponents-2.1.xsd
-
common/UBL-QualifiedDataTypes-2.1.xsd
-
common/UBL-UnqualifiedDataTypes-2.1.xsd
-
common/UBL-ExtensionContentDataType-2.1.xsd
-
common/CCTS_CCT_SchemaModule-2.1.xsd
-
common/UBL-CommonSignatureComponents-2.1.xsd
-
common/UBL-SignatureAggregateComponents-2.1.xsd
-
common/UBL-SignatureBasicComponents-2.1.xsd
-
common/UBL-xmldsig-core-schema-2.1.xsd
-
common/UBL-XAdESv132-2.1.xsd
-
common/UBL-XAdESv141-2.1.xsd
The validator loads all of these with their folder structure, so includes and imports resolve as published.
Business rules
Schematron · run in this order-
RO e-Factura tax code checks ANAF validator 1.3.0
xmlvalid, after the checks of ANAF's RO e-Factura validator · MIT
The rules run after the schema check, only when the document matches the schema, and in your browser like the schema check (with SaxonJS by Saxonica). Each finding names its rule, such as BR-CO-15, and the line it points at; each rule has a page with what it checks.
Example document
ro-efactura-credit-note.xml · 4.8 KB · passes the schema and the rules
In CI and from code
The same schema by its name, ro-efactura-credit-note, through the API.
npx @xmlvalid/cli validate "**/*.xml" --schema ro-efactura-credit-note
- uses: xmlvalid/validate-action@v1
with:
files: "**/*.xml"
schema: ro-efactura-credit-note
api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
-H "Authorization: Bearer $XMLVALID_API_KEY" \
-F document={{ $schema->example ?? 'document.xml' }} -F schema=ro-efactura-credit-note
Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups