API documentation

Base URL: https://fakturwire.com · Auth: Authorization: Bearer fw_live_… · Every new account gets 50 free credits — no card required.

# 1. Sign up → API key + 50 free credits
curl -X POST https://fakturwire.com/v1/signup \
  -H 'content-type: application/json' \
  -d '{"email":"you@example.com"}'

# 2. Convert JSON → XRechnung (2 credits)
curl -X POST https://fakturwire.com/v1/convert \
  -H "authorization: Bearer $FW_KEY" \
  -H 'content-type: application/json' \
  -d '{"target":"xrechnung-ubl","invoice":<INVOICE_JSON>}'
const res = await fetch('https://fakturwire.com/v1/convert', {
  method: 'POST',
  headers: {
    authorization: `Bearer ${process.env.FW_KEY}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({ target: 'xrechnung-ubl', invoice }),
});
const { xml, credits, warnings } = await res.json();
// res.status 422 → body.findings lists every rule violation
$ch = curl_init('https://fakturwire.com/v1/convert');
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    'authorization: Bearer ' . getenv('FW_KEY'),
    'content-type: application/json',
  ],
  CURLOPT_POSTFIELDS => json_encode([
    'target' => 'xrechnung-ubl',
    'invoice' => $invoice,
  ]),
]);
$result = json_decode(curl_exec($ch), true);
// $result['xml'] contains the compliant XRechnung document
import os, requests

res = requests.post(
    "https://fakturwire.com/v1/convert",
    headers={"authorization": f"Bearer {os.environ['FW_KEY']}"},
    json={"target": "xrechnung-ubl", "invoice": invoice},
)
if res.status_code == 422:
    for f in res.json()["findings"]:
        print(f["rule"], f["message"])
else:
    xml = res.json()["xml"]
using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("FW_KEY"));

var payload = new { target = "xrechnung-ubl", invoice };
var res = await http.PostAsJsonAsync("https://fakturwire.com/v1/convert", payload);
var body = await res.Content.ReadFromJsonAsync<JsonElement>();
// body.GetProperty("xml") → compliant XRechnung document

No-code & SDKs

No developer on the team? Send invoices through FakturWire from Postman, Zapier or Make, no code needed. If you do write code, the official SDKs wrap the API with typed errors, and a 422 gives you the list of findings to fix.

Postman Available

Every endpoint ready to send: validate, convert to XRechnung / Peppol / Factur-X, extract, plus the free tools. Each request has an example body and saved responses. Import both files, paste your API key into the apiKey variable, press Send.

Collection (.json) · Environment · Sample invoice

Zapier Coming soon

Actions: Validate E-Invoice, Convert Invoice to XRechnung / Peppol / Factur-X (XML as text and as a file attachment) and Extract Invoice From PDF. Use them to connect Google Sheets, Shopify or Gmail to compliant e-invoices. Want early access? Ask for an invite link.

Make Coming soon

A Make (Integromat) app with the same modules: validate, convert (with an XML file output) and PDF extraction. Invalid invoices raise a DataError you can catch with an error handler. Want early access? Ask for an invite link.

Official SDKs

# Node.js / TypeScript (npm: fakturwire)
npm install fakturwire

# Python 3.9+ (PyPI: fakturwire) — coming soon
# pip install fakturwire

# PHP (Packagist: fakturwire/sdk) — coming soon
# .NET (NuGet: FakturWire) — coming soon

The Node SDK is available now. The Python, PHP and .NET packages are built and tested and will be published shortly. Until then, call the REST API directly with the samples above.

Endpoints

POST /v1/validate — 1 credit

Body: { "xml": "<UBL string>" } or { "invoice": {…canonical JSON…} }, plus optional "profile": en16931 (default) · peppol-bis-3 · xrechnung. Returns valid, findings[] (rule, severity, message, path) and counts. Accepts UBL and CII (Factur-X / ZUGFeRD) XML.

Every call also runs the official Schematron rules (CEN EN 16931, OpenPeppol, KoSIT XRechnung) on the XML: official = { valid, syntax, rulesets }, and official findings our own rules don't already explain are added to findings[] with "source": "official" and the XPath location. How we test against the official corpus.

POST /v1/convert — 2 credits

Body: input (invoice JSON or xml UBL) + "target": peppol-bis-3 · xrechnung-ubl · facturx-en16931. Returns the compliant XML. If the invoice violates the target profile's rules you get HTTP 422 with the full findings list and no charge. The generated document is re-checked with the official rules before it is returned (and charged); the response carries official: { valid: true, … }.

Hybrid PDF/A-3, no extra credits: add "pdf": true (or { "lang": "de", "logo": "<base64 PNG/JPEG>", "accentColor": "#2050E0", "footer": ["…"] }) with facturx-en16931 (Factur-X) or xrechnung-ubl (ZUGFeRD with the XRechnung embedded as CII). The response adds pdf (base64), pdfAttachment (factur-x.xml / xrechnung.xml), pdfXml when the embedded XML differs from xml, and pdfa, the veraPDF PDF/A-3b report. Send "attachTo": "<base64 PDF>" to embed the XML into your own invoice layout instead; a PDF that isn't PDF/A-3 conformant comes back as 422 with the failed clauses, uncharged.

POST /v1/extract — 10 credits

Send the PDF as the raw request body with Content-Type: application/pdf (up to 10 MB; scanned and multi-page invoices work). Returns invoice (canonical EN 16931 JSON) and uncertainFields[] — every value the model wasn't sure about, each with a reason, so you never get a silent guess. The invoice pipes straight into /v1/validate and /v1/convert. Not a PDF → 400; unreadable/encrypted or not-an-invoice → 422, no charge. Your PDF is never stored or logged.

GET /v1/me — free

Returns your account and current credit balance.

Full chain: PDF → XRechnung

Turn a legacy PDF invoice into a compliant XRechnung in two calls — extract, then convert. Review uncertainFields before you trust the result.

# 1. Extract a PDF invoice → canonical JSON (10 credits).
#    Send the PDF as the raw body with Content-Type: application/pdf.
curl -X POST https://fakturwire.com/v1/extract \
  -H "authorization: Bearer $FW_KEY" \
  -H 'content-type: application/pdf' \
  --data-binary @invoice.pdf > extracted.json

# Response shape:
# {
#   "invoice": { "number": "RE-2026-0042", "currency": "EUR", ... },
#   "uncertainFields": [
#     { "field": "buyer.vatId", "reason": "Partially obscured on the scan." }
#   ],
#   "model": "claude-sonnet-4-6",
#   "credits": 90
# }
# → Review uncertainFields before trusting the data.

# 2. Convert the extracted invoice → XRechnung (2 credits).
INVOICE=$(jq '.invoice' extracted.json)
curl -X POST https://fakturwire.com/v1/convert \
  -H "authorization: Bearer $FW_KEY" \
  -H 'content-type: application/json' \
  -d "{\"target\":\"xrechnung-ubl\",\"invoice\":$INVOICE}"
# → compliant XRechnung 3.x UBL. 422 (uncharged) if it fails the profile's rules.

The canonical invoice JSON

Field names map 1:1 to EN 16931 business terms (BT-x). Amounts are strings to avoid floating-point surprises. Totals and VAT breakdown are computed for you when omitted.

{
  "number": "INV-2026-0042",
  "issueDate": "2026-07-01",
  "dueDate": "2026-07-31",
  "currency": "EUR",
  "buyerReference": "04011000-12345-67",
  "seller": {
    "name": "Example Kft.",
    "vatId": "HU12345678",
    "electronicAddress": { "schemeId": "9910", "value": "HU12345678" },
    "address": { "streetName": "Fő utca 1.", "city": "Budapest", "postalZone": "1011", "countryCode": "HU" },
    "contact": { "name": "Anna Kovács", "phone": "+36 1 234 5678", "email": "anna@example.hu" }
  },
  "buyer": {
    "name": "Muster GmbH",
    "vatId": "DE123456789",
    "electronicAddress": { "schemeId": "9930", "value": "DE123456789" },
    "address": { "streetName": "Hauptstraße 5", "city": "Berlin", "postalZone": "10115", "countryCode": "DE" }
  },
  "payment": { "meansCode": "58", "iban": "HU42117730161111101800000000", "terms": "30 days" },
  "lines": [
    { "id": "1", "name": "Consulting", "quantity": "10", "unitCode": "HUR",
      "unitPrice": "120.00", "vat": { "categoryCode": "AE", "rate": "0" } }
  ],
  "vatBreakdown": [
    { "categoryCode": "AE", "rate": "0", "taxableAmount": "1200.00", "taxAmount": "0.00",
      "exemptionReasonCode": "VATEX-EU-AE", "exemptionReason": "Reverse charge" }
  ]
}