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 Official SDKs
Thin, dependency-free clients around /v1/validate, /v1/convert and
/v1/me — typed errors, and 422 gives you the findings list to fix.
# Node.js / TypeScript (npm: fakturwire) npm install fakturwire # PHP (Packagist: fakturwire/sdk) — coming soon # .NET (NuGet: FakturWire) — coming soon
The Node SDK is live now. The PHP and .NET packages are built and tested — publishing 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.
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.
POST /v1/extract — 10 credits soon
PDF invoice in → structured EN 16931 JSON out (LLM-powered extraction with confidence scores), ready to pipe into /v1/convert.
GET /v1/me — free
Returns your account and current credit balance.
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" }
]
}