Description
n8n-nodes-invoice-api-xhub




This is the official invoice-api.xhub community node for n8n. Generate, parse, convert, and validate e-invoices across 37 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?
- 37 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
- AI-ready — usable as a tool in n8n AI Agent workflows
- Free sandbox — test with
sktest*keys, no credit card required - Why invoice-api.xhub?
- Installation
- Operations
- Credentials
- Compatibility
- Usage
- Troubleshooting
- Resources
- Convert an e-invoice between formats (e.g. XRechnung → ZUGFeRD / Factur-X, or back to XRechnung) — source format and country are auto-detected, fields that cannot be carried across are reported as
conversionWarnings - Create e-invoice from JSON data (XRechnung, ZUGFeRD, Factur-X, FatturaPA, and more)
- Extract structured invoice data from XML or PDF documents
- Parse an invoice with automatic country and format detection — no configuration needed
- Validate invoice JSON against country-specific rules and return errors/warnings
validreflects the object-level country rules only (required fields, totals, VAT IDs)results[]has one entry per e-invoice format: the generated XML checked against XSD + Schematron, each with its ownvalidanderrors[]- An invoice can be
valid: truewhileresults[n].validisfalse— enable Fail on Errors and checkresultswhen you need format-level conformance - Retrieve all supported countries and formats, or formats for a specific country
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
Convert
Generate
Parse
Parse (Auto-Detect)
Validate
Get Formats
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 sklive... (production) or sktest... (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 (37)
| Region | Countries |
| ————————– | ———————————————————————————————————————– |
| DACH | Germany (DE), Austria (AT), Switzerland (CH), Liechtenstein (LI) |
| 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), Iceland (IS) |
| Baltics | Estonia (EE), Latvia (LV), Lithuania (LT) |
| Central & Eastern Europe | Poland (PL), Czech Republic (CZ), Slovakia (SK), Hungary (HU), Slovenia (SI), Croatia (HR), Romania (RO), Bulgaria (BG) |
| Middle East & Asia-Pacific | United Arab Emirates (AE), Oman (OM), Japan (JP), Australia (AU), New Zealand (NZ) |
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.0,
"netAmount": 1500.0,
"taxRate": 19,
"taxAmount": 285.0,
"grossAmount": 1785.0
}
],
"taxSummary": [{ "taxRate": 19, "netAmount": 1500.0, "taxAmount": 285.0 }],
"subtotal": 1500.0,
"total": 1785.0,
"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 (sklive or sktest) 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 |
| Fields from the previous node are gone after this node | Every operation replaces the item JSON with the API response (success, valid, results, data, …). Read upstream data explicitly, e.g. $('Build Invoice').item.json.department, instead of expecting it on $json |
| API error never reaches the Error Output | With “On Error → Continue” (regular or error output) the node catches API errors itself and emits { success: false, error, httpCode, errors[], complianceErrors[] } on the main output. Add an IF on {{ $json.success }} right after the node to route failures; the Error Output only fires for exceptions the node does not catch |
For more help, see the full troubleshooting guide or contact support@xhub.io.
Resources
Version History
See Releases for the full changelog.