Valifakt API
Die REST-API v1 ist für Abonnenten der Pläne Pro und Office verfügbar. Damit binden Sie Umwandlung und Prüfung von E-Rechnungen in ERP, Buchhaltung oder Skripte ein. Basis-URL: https://valifakt.com/api/v1.
API-Schlüssel holen (Office, 1.000/Monat) Pro wählen (100/Monat) OpenAPI-Spezifikation herunterladen
Preise (bestehende Pläne)
Der Schlüssel kommt per E-Mail nach dem Checkout über Paddle (Präfix vf_). API und Website teilen sich dasselbe Monatskontingent. Zahlung monatlich kündbar, Preise inkl. USt.
| Plan | Preis | Umwandlungen / Monat | Ratenlimit |
|---|---|---|---|
| Free | 0 € | 3 (nur Website, ohne Schlüssel) | 10 anonyme Anfragen/Minute an /api/convert und /api/demo |
| Pro | 12 € / Monat (120 € / Jahr) | 100 erfolgreiche Umwandlungen | 10 Anfragen/Minute je Schlüssel |
| Office | 49 € / Monat (490 € / Jahr) | 1.000 erfolgreiche Umwandlungen, Prüfen ohne Monatslimit | 30 Anfragen/Minute je Schlüssel |
Ein höheres Kontingent (Plan api, 100.000 Umwandlungen/Kalendermonat, 60 Anfragen/Minute) gibt es auf Anfrage an hello@valifakt.com, nicht als Selbstbedienungspreis.
OpenAPI
Maschinenlesbare Beschreibung (OpenAPI 3): /api/v1/openapi.json – zum Import in Postman, Insomnia oder einen Codegenerator.
Authentifizierung und Limits
Header Authorization: Bearer vf_…. Nur vom Server aufrufen, nie aus dem Browser. Nur eine Umwandlung mit status: valid zählt zum Monatskontingent; /validate, Fehler und needs_input zählen nicht. Antworten von /convert und /validate enthalten X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset; bei HTTP 429 zusätzlich Retry-After.
Die vollständige Endpunkt- und Fehlertabelle steht in der REST-API-v1-Referenz. Die älteren Endpunkte mit X-API-Key (/api/convert, /api/validate, /api/quota) laufen weiter und zählen zum selben Kontingent.
Beispiele
curl
curl -sS -X POST https://valifakt.com/api/v1/convert \
-H "Authorization: Bearer $VALIFAKT_API_KEY" \
-F "country=de" \
-F "format=xrechnung-ubl" \
-F "file=@invoice.pdf;type=application/pdf"
# download the XML from files.xml in the response
curl -sS -o invoice.xml -H "Authorization: Bearer $VALIFAKT_API_KEY" \
https://valifakt.com/api/v1/jobs/JOB_ID/xml
curl -sS -X POST https://valifakt.com/api/v1/validate \
-H "Authorization: Bearer $VALIFAKT_API_KEY" \
-F "file=@xrechnung.xml;type=application/xml"Python
import json, os, requests
API = "https://valifakt.com/api/v1"
H = {"Authorization": f"Bearer {os.environ['VALIFAKT_API_KEY']}"}
with open("invoice.pdf", "rb") as f:
r = requests.post(f"{API}/convert", headers=H, timeout=120,
data={"country": "de", "format": "xrechnung-ubl"},
files={"file": ("invoice.pdf", f, "application/pdf")})
if r.status_code != 200:
err = r.json()["error"]
raise SystemExit(f"{r.status_code} {err['code']}: {err['message']}")
job = r.json()
if job["status"] == "valid":
xml = requests.get(job["files"]["xml"], headers=H, timeout=60)
open("invoice.xml", "wb").write(xml.content)
elif job["status"] == "needs_input":
print("fill in and send again as patch:", [m["field"] for m in job["missing"]])
# e.g. data["patch"] = json.dumps({"buyer_reference": "04011000-1234512345-06"})
print(job["quota"])JavaScript (Node 18+)
// Node.js 18+ (built-in fetch, FormData, Blob)
import { readFile, writeFile } from "node:fs/promises";
const API = "https://valifakt.com/api/v1";
const headers = { Authorization: `Bearer ${process.env.VALIFAKT_API_KEY}` };
const form = new FormData();
form.append("country", "de");
form.append("format", "xrechnung-ubl");
form.append("file", new Blob([await readFile("invoice.pdf")], { type: "application/pdf" }), "invoice.pdf");
const res = await fetch(`${API}/convert`, { method: "POST", headers, body: form });
const body = await res.json();
if (!res.ok) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`);
if (body.status === "valid") {
const xml = await fetch(body.files.xml, { headers });
await writeFile("invoice.xml", Buffer.from(await xml.arrayBuffer()));
} else {
console.log(body.status, body.missing.map((m) => m.field));
}
console.log(body.quota, res.headers.get("x-ratelimit-remaining"));Open-Source-Client (Python)
MIT-Lizenz, keine Drittanbieter-Laufzeitabhängigkeiten, Python 3.10+. Der Client spricht nur dokumentierte Endpunkte. Noch nicht auf PyPI; Installation aus dem Quellenarchiv:
python3 -m pip install https://valifakt.com/assets/valifakt-python-client-0.1.0.zipPython-Client herunterladen (zip)
from valifakt import Client
c = Client(api_key="vf_...") # or VALIFAKT_API_KEY
print(c.health())
report = c.validate("invoice.xml")
result = c.convert("invoice.pdf", country="de", format="xrechnung-ubl")
if result["status"] == "valid":
c.download(result["job"], "xml", "invoice.xml")Der mitgelieferte Client nutzt die stabilen Endpunkte /api/convert und /api/validate mit dem Header X-API-Key. Dieselben Schlüssel funktionieren an der REST-API v1 mit Authorization: Bearer.
Open Source: Kommandozeile und GitHub Action
MIT-lizenziert, öffentlich auf GitHub. valifakt-cli prüft XRechnung, ZUGFeRD, Peppol BIS und KSeF FA(3) lokal (offline) und über die API, wandelt mit Ihrem Schlüssel um und liefert Annotationen für CI.
pip install "valifakt-cli[offline] @ git+https://github.com/saoudaltamimi/valifakt-cli@v0.1.2"
valifakt validate invoices/*.xmlDie GitHub Action validate-einvoice prüft E-Rechnungen in jedem Pull Request.
- uses: saoudaltamimi/validate-einvoice@v1
with:
files: invoices/**/*.xmlvalifakt-cli (GitHub) validate-einvoice (GitHub Action)
FAQ
Wie erhalte ich einen Schlüssel?
Über die Preisseite ein Abo Pro (12 €/Monat, 100 erfolgreiche Umwandlungen) oder Office (49 €/Monat, 1.000). Zahlung über Paddle. Nach der Zahlung wird ein API-Schlüssel mit Präfix vf_ ausgestellt und per E-Mail zugestellt. Das Kontingent api (100.000 Umwandlungen/Kalendermonat) gibt es auf Anfrage, nicht als Selbstbedienungspreis.
Zählt /validate zum Monatskontingent?
Nein. Nur eine Umwandlung mit status valid erhöht den Zähler.
Gibt es eine maschinenlesbare Beschreibung?
Ja: https://valifakt.com/api/v1/openapi.json (OpenAPI 3). Eine Swagger-Oberfläche gibt es auf der Website nicht, weil die Content-Security-Policy deren CDN-Skripte blockiert.
Stand der Angaben: 30.11.2026. Keine Steuer- oder Rechtsberatung.