Docs › OrderBay › UBL e-invoicing

OrderBay UBL 2.1 E-Invoicing Guide

How to set up OrderBay Pro so it can export UBL 2.1 and CII (Factur-X) invoice XML from a WooCommerce order, check the file, and hand it to your accountant or an access point. OrderBay creates the file. It does not send it anywhere.

What OrderBay does and does not do

  • Builds UBL 2.1 XML using the Peppol BIS Billing 3.0 profile, and CII XML for Factur-X (EN16931 profile), from one order.
  • Optionally builds a Factur-X PDF/A-3 when your host already has a PDF engine (Dompdf or TCPDF) and the horstoeko/zugferd library installed.
  • Covers the EN16931 mandatory core: seller and buyer, invoice lines, tax subtotals per rate, and totals.

OrderBay is export only. It is not a Peppol access point, it does not connect to a PDP or a government portal, and it does not run the official EN16931 Schematron rules inside the plugin. Validate a real order’s file with an official validator before you rely on it, and confirm what your country requires with your accountant. This is not tax advice.

1. Fill in the seller details

In the WordPress admin, open OrderBay › Documents. With an active trial or key, the page has an E-invoicing (UBL / Factur-X) section with a readiness check. It lists anything missing.

Field in the fileWhere OrderBay reads it
Seller legal nameFirst line of From name / address (Documents settings). Falls back to the site title.
Seller street, city, postcodeWooCommerce store address (WooCommerce › Settings › General).
Seller countrySeller country (ISO) in Documents settings. Blank uses the WooCommerce store country.
Seller VAT / tax IDCompany VAT / Tax ID in Documents settings, with the country prefix (for example DE123456789).
Buyer name and addressThe order’s billing details. Billing company is used when there is no name.
Buyer VAT numberThe order meta field _billing_vat, if your checkout collects it.

Tax categories come from the order itself. A line with tax gets category S at the rate WooCommerce charged, and a line with no tax gets Z. Shipping and fees become their own invoice lines. If your store uses exemptions or reverse charge, check the file carefully, because those need codes OrderBay does not set for you.

2. Download the XML for an order

Open the order in WooCommerce › Orders. In the OrderBay documents box you will see two buttons next to the invoice and packing documents:

  • E-invoice UBL downloads einvoice-ubl-<number>.xml.
  • E-invoice CII (Factur-X) downloads einvoice-cii-<number>.xml.
  • Factur-X PDF appears only when the PDF engine and zugferd library are on the host.

If something required is missing, the box shows “E-invoice XML is a draft, not fully compliant yet” with the reason, such as a missing buyer country or totals that don’t reconcile. Fix the order or the settings and download again. The invoice number in the file is the OrderBay invoice number stored on the order, so it matches the PDF.

Export is one order at a time. There is no bulk XML export and OrderBay does not attach the XML to customer emails.

3. Check the file before you use it

Run one real order’s file through an official validator before you send anything to a customer or an authority. The Peppol BIS Billing 3.0 and EN16931 validators check the Schematron business rules that OrderBay does not run itself. Test your awkward cases too: discounts, mixed tax rates, shipping, and refunds.

4. Hand it on

What happens next depends on who needs the invoice and where you are:

  • Your accountant or bookkeeping software. Many tools accept UBL or Factur-X files. Check that yours does before you rely on it.
  • A government or procurement portal. Some public buyers accept an uploaded XML file through their portal. Each portal has its own rules and identifiers, which OrderBay does not fill in for you.
  • A Peppol access point. If a buyer requires delivery over Peppol, you need a certified access point or PDP to send it. OrderBay’s job ends at the file.

5. What a file looks like

This is the actual output of OrderBay’s UBL builder for a made-up order (two mugs plus shipping, 19% VAT). It shows the structure only. It is not an officially validated sample, so generate and validate your own.

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
  <cbc:ID>INV-2026-0042</cbc:ID>
  <cbc:IssueDate>2026-10-01</cbc:IssueDate>
  <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <cac:AccountingSupplierParty>
    <cac:Party>
      <cac:PostalAddress>
        <cbc:StreetName>Musterstrasse 1</cbc:StreetName>
        <cbc:CityName>Berlin</cbc:CityName>
        <cbc:PostalZone>10115</cbc:PostalZone>
        <cac:Country>
          <cbc:IdentificationCode>DE</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>DE123456789</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>Example Store GmbH</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:AccountingSupplierParty>
  <cac:AccountingCustomerParty>
    <cac:Party>
      <cac:PostalAddress>
        <cbc:StreetName>Beispielweg 2</cbc:StreetName>
        <cbc:CityName>Munich</cbc:CityName>
        <cbc:PostalZone>80331</cbc:PostalZone>
        <cac:Country>
          <cbc:IdentificationCode>DE</cbc:IdentificationCode>
        </cac:Country>
      </cac:PostalAddress>
      <cac:PartyTaxScheme>
        <cbc:CompanyID>DE987654321</cbc:CompanyID>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:PartyTaxScheme>
      <cac:PartyLegalEntity>
        <cbc:RegistrationName>Example Buyer AG</cbc:RegistrationName>
      </cac:PartyLegalEntity>
    </cac:Party>
  </cac:AccountingCustomerParty>
  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="EUR">6.65</cbc:TaxAmount>
    <cac:TaxSubtotal>
      <cbc:TaxableAmount currencyID="EUR">35.00</cbc:TaxableAmount>
      <cbc:TaxAmount currencyID="EUR">6.65</cbc:TaxAmount>
      <cac:TaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>19.00</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:TaxCategory>
    </cac:TaxSubtotal>
  </cac:TaxTotal>
  <cac:LegalMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="EUR">35.00</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="EUR">35.00</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="EUR">41.65</cbc:TaxInclusiveAmount>
    <cbc:PayableAmount currencyID="EUR">41.65</cbc:PayableAmount>
  </cac:LegalMonetaryTotal>
  <cac:InvoiceLine>
    <cbc:ID>1</cbc:ID>
    <cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="EUR">30.00</cbc:LineExtensionAmount>
    <cac:Item>
      <cbc:Name>Ceramic mug, personalised</cbc:Name>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>19.00</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
      <cbc:PriceAmount currencyID="EUR">15.00</cbc:PriceAmount>
    </cac:Price>
  </cac:InvoiceLine>
  <cac:InvoiceLine>
    <cbc:ID>2</cbc:ID>
    <cbc:InvoicedQuantity unitCode="C62">1</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="EUR">5.00</cbc:LineExtensionAmount>
    <cac:Item>
      <cbc:Name>Shipping</cbc:Name>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID>
        <cbc:Percent>19.00</cbc:Percent>
        <cac:TaxScheme>
          <cbc:ID>VAT</cbc:ID>
        </cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
      <cbc:PriceAmount currencyID="EUR">5.00</cbc:PriceAmount>
    </cac:Price>
  </cac:InvoiceLine>
</Invoice>

More: OrderBay setup · WooCommerce e-invoicing and the EU mandates · Support