Documentation
Invoice-api.xhub API Documentation
Everything you need to create, validate, and send e-invoices. From quickstart guides to the full API reference.
1# 1. Set API key2export XHUB_API_KEY=sk_live_...3 4# 2. Create e-invoice5curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/de/xrechnung/generate \6 -H "Authorization: Bearer $XHUB_API_KEY" \7 -H "Content-Type: application/json" \8 -d '{9 "invoice": {10 "invoiceNumber": "RE-2026-0042",11 "type": "invoice",12 "issueDate": "2026-03-01",13 "currency": "EUR",14 "seller": {15 "name": "Deine Firma GmbH",16 "street": "Musterstraße 1",17 "city": "Berlin",18 "postalCode": "10115",19 "countryCode": "DE",20 "vatId": "DE123456789",21 "email": "rechnung@deinefirma.de",22 "phone": "+49 30 12345678",23 "bankAccount": { "iban": "DE89370400440532013000" }24 },25 "buyer": {26 "name": "Kunde AG",27 "street": "Kundenweg 42",28 "city": "München",29 "postalCode": "80331",30 "countryCode": "DE",31 "vatId": "DE987654321"32 },33 "items": [34 {35 "description": "Beratung",36 "quantity": 1,37 "unit": "C62",38 "unitPrice": 1500.00,39 "taxRate": 19,40 "netAmount": 1500.00,41 "taxAmount": 285.0042 }43 ],44 "subtotal": 1500.00,45 "total": 1785.00,46 "taxSummary": [47 { "taxRate": 19, "taxCategoryCode": "S", "netAmount": 1500.00, "taxAmount": 285.00 }48 ],49 "paymentMethods": [{ "type": "bank_transfer" }]50 }51 }'52 53# ✓ Response: {"success": true, "format": "xrechnung", ...}Getting Started
How it works
Every building block and how they fit together
Quickstart
Create your first e-invoice in 5 minutes
Authentication
Create and manage API keys
Webhooks
Receive and process events
Error Handling
Understand and handle errors
Field reference
Every field of the invoice object: type, required flag and meaning.
Recipes
One concrete task per page, including the part that usually goes wrong.
API Reference
View all APIsInvoice Creator
Generate XRechnung & ZUGFeRD e-invoices
POST /api/v1/invoice/{countryCode}/{format}/generateValidator
Validate e-invoices against KoSIT schemas
POST /api/v1/invoice/{countryCode}/validateParser
Extract structured data from e-invoices
POST /api/v1/invoice/parseFormats
List supported formats and countries
GET /api/v1/invoice/formatsGET /api/v1/invoice/{countryCode}/formatsConverter
Convert e-invoices between formats
POST /api/v1/invoice/convertAttachments
Embed files into an existing PDF
POST /api/v1/invoice/attachmentsPOST /api/v1/pdf/attachmentsVeriFactu QR (ES)
Build the Spanish VeriFactu QR code
POST /api/v1/invoice/es/verifactu-qrVisualizer
Render e-invoices as PDF/HTML
POST /api/v1/invoice/renderArchive
GoBD-compliant long-term archiving
POST /api/v1/invoice/archivePeppol Gateway
Send e-invoices via the Peppol network
POST /api/v1/peppol/sendCode Examples
No SDK required – just use HTTP requests in your preferred language.
curl
Universally usable in any terminal
curl -X POST https://service.invoice-api.xhub.io/api/v1/invoice/de/xrechnung/generate \...Node.js
With fetch() or any HTTP client
const res = await fetch('https://service.invoice-api.xhub.io/api/v1/invoice/de/xrechnung/generate', {...Python
With requests or httpx
response = requests.post(...PHP
With Guzzle or cURL
$response = $client->post('https://service.invoice-api.xhub.io/api/v1/invoice/de/xrechnung/generate', [...Quick Start in 3 Steps
Create API Key
Sign up and create an API key in the dashboard.
sk_live_abc123...Send Request
Send an HTTP request to our REST API.
POST /api/v1/invoice/de/xrechnung/generateReceive Invoice
Receive a valid XRechnung or ZUGFeRD back.
{ "success": true, "format": "xrechnung", "data": "base64..." }