Skip to content

xhubio/n8n-nodes-invoice-api-xhub

Repository files navigation

n8n-nodes-invoice-api-xhub

npm version npm downloads License: MIT n8n

This is the official invoice-api.xhub community node for n8n. Generate, parse, and validate e-invoices across 28 European countries and 18+ formats — including XRechnung, ZUGFeRD, Factur-X, FatturaPA, and Peppol — directly from your n8n workflows.

Full documentation | API Playground | OpenAPI Reference | YouTube

Why invoice-api.xhub?

  • 28 countries, 18+ formats — one unified JSON schema for XRechnung, ZUGFeRD, Factur-X, FatturaPA, UBL, Peppol, and more
  • Compliance built in — validation against country-specific rules (EN 16931, B2G/B2B mandates)
  • No-code automation — drag-and-drop n8n node with auto-detect parsing, binary file support, and batch processing
  • Free sandbox — test with sk_test_* keys, no credit card required

See the full feature overview and n8n workflow templates.

Table of Contents

Installation

Follow the installation guide in the n8n community nodes documentation.

The package name is n8n-nodes-invoice-api-xhub.

For a step-by-step walkthrough, see the n8n Integration Guide or watch the video walkthrough on YouTube.

Operations

Generate

  • Create e-invoice from JSON data (XRechnung, ZUGFeRD, Factur-X, FatturaPA, and more)

Parse

  • Extract structured invoice data from XML or PDF documents

Parse (Auto-Detect)

  • Parse an invoice with automatic country and format detection — no configuration needed

Validate

  • Validate invoice JSON against country-specific rules and return errors/warnings

Get Formats

  • Retrieve all supported countries and formats, or formats for a specific country

Credentials

This node requires an API key from invoice-api.xhub.io.

  1. Register at invoice-api.xhub.io and navigate to Dashboard → API Keys
  2. Create a new API key — keys follow the format sk_live_... (production) or sk_test_... (sandbox)
  3. In n8n, go to Credentials → New Credential, search for "invoice-api.xhub API", and enter your key

The credential test automatically verifies the connection by calling GET /api/v1/invoice/formats.

Compatibility

Tested with n8n 1.94.0 and later.

Requires Node.js ≥ 22.0.

Usage

Supported Countries (28)

Region Countries
DACH Germany (DE), Austria (AT), Switzerland (CH)
Western Europe France (FR), Belgium (BE), Netherlands (NL), Luxembourg (LU), Ireland (IE), United Kingdom (GB)
Southern Europe Italy (IT), Spain (ES), Portugal (PT), Greece (GR), Cyprus (CY), Malta (MT)
Northern Europe Denmark (DK), Sweden (SE), Finland (FI), Norway (NO)
Baltics Estonia (EE), Latvia (LV), Lithuania (LT)
Central & Eastern Europe Poland (PL), Czech Republic (CZ), Hungary (HU), Slovenia (SI), Romania (RO), Bulgaria (BG)

Supported Formats

pdf · ubl · peppol-ubl · zugferd · xrechnung · ebinterface · qr-bill · facturx · fatturapa · facturae · isdoc · nav · mydata · cii · ksef · efactura · saft

For format details and country-specific requirements, see the API documentation.

Minimal Example: Generate a German XRechnung

{
  "operation": "generate",
  "countryCode": "DE",
  "format": "xrechnung",
  "invoiceData": {
    "type": "invoice",
    "invoiceNumber": "INV-2025-001",
    "issueDate": "2025-01-15",
    "dueDate": "2025-02-14",
    "currency": "EUR",
    "seller": { "name": "ACME GmbH", "street": "Hauptstraße 1", "city": "Berlin", "postalCode": "10115", "countryCode": "DE", "vatId": "DE123456789" },
    "buyer": { "name": "Customer AG", "street": "Nebenstraße 2", "city": "München", "postalCode": "80331", "countryCode": "DE" },
    "countrySpecific": { "buyerReference": "BUYER-REF-001" },
    "items": [{ "position": 1, "description": "Consulting", "quantity": 10, "unit": "HUR", "unitPrice": 150.00, "netAmount": 1500.00, "taxRate": 19, "taxAmount": 285.00, "grossAmount": 1785.00 }],
    "taxSummary": [{ "taxRate": 19, "netAmount": 1500.00, "taxAmount": 285.00 }],
    "subtotal": 1500.00,
    "total": 1785.00,
    "paymentTerms": { "dueDays": 30 }
  }
}

For the full invoice data schema, all parameters, and workflow examples see the API Reference and n8n workflow templates.

Troubleshooting

Issue Solution
401 Unauthorized Check your API key format (sk_live_* or sk_test_*) and that it's entered in the credential
Invalid VAT ID Ensure VAT IDs include the country prefix (e.g., DE123456789)
Binary output is empty Set "Output Binary" to true and check the binary property name (default: data)
Request timeout For large batches, increase the n8n node timeout or process invoices in smaller chunks
Format not found Use the "Get Formats" operation to list available formats for a country

For more help, see the full troubleshooting guide or contact support@xhub.io.

Resources

Version History

See Releases for the full changelog.

License

MIT