curatedapi

ZUGFeRD / Factur-X creator (PDF)

Send the invoice as JSON, get back a ZUGFeRD / Factur-X PDF/A-3 with the XML inside, checked against the official rules.

What it does

Builds the CII XML for the EN 16931 profile (or the XRECHNUNG profile), draws a readable A4 invoice from the same data in German or English, and embeds the XML in a PDF/A-3b with the Factur-X metadata. The finished PDF is then read back and its XML checked with the Factur-X 1.09.2 / ZUGFeRD 2.5 rules (or KoSIT's, for XRECHNUNG). If any rule fails, no file is returned and the call is not billed.

  • The PDF is drawn by us from the JSON. Bringing your own PDF layout is not supported yet.
  • The PDF is written as PDF/A-3b by fpdf2, which enforces the PDF/A rules it knows; each PDF is not run through a separate PDF/A checker.
  • Profiles MINIMUM, BASIC WL, BASIC and EXTENDED are not offered: MINIMUM and BASIC WL do not count as e-invoices in Germany.

The totals are worked out once, the way EN 16931 defines them: each line's net amount, the VAT for each rate and category, and the amount due. The answer gives them next to the file, so your app can compare them with its own. A file that breaks an official rule is never returned: the call fails with INVOICE_NOT_VALID, names each rule and the field to look at, and is not billed.

The invoice is not stored, logged or cached. It is held in memory for the length of the call.

Rules every file is checked with

A check shows whether the invoice passes the official rule sets listed, at the versions listed. It is not legal or tax advice, and passing does not promise that a tax authority or buyer will accept the invoice. See the terms.

Use it from your code

POST /v1/create/einvoice/zugferdVersion 1
curl https://api.curatedapi.com/v1/create/einvoice/zugferd \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profile": "en16931",
    "language": "de",
    "invoice": {"number": "471102", "issue_date": "2018-03-05", "currency": "EUR", "notes": ["Rechnung gemäß Bestellung vom 01.03.2018."], "seller": {"name": "Lieferant GmbH", "id": {"id": "4000001123452", "scheme": "0088"}, "address": {"line1": "Lieferantenstraße 20", "city": "München", "postcode": "80333", "country": "DE"}, "vat_id": "DE123456789", "tax_number": "201/113/40209", "legal_info": "Lieferant GmbH, Lieferantenstraße 20, 80333 München, Deutschland, Geschäftsführer: Hans Muster, Handelsregisternummer: H A 123"}, "buyer": {"name": "Kunden AG Mitte", "id": "GE2020211", "address": {"line1": "Kundenstraße 15", "city": "Frankfurt", "postcode": "69876", "country": "DE"}}, "delivery_date": "2018-03-05", "payment": {"terms": "Zahlbar innerhalb 30 Tagen netto bis 04.04.2018, 3% Skonto innerhalb 10 Tagen bis 15.03.2018"}, "lines": [{"name": "Trennblätter A4", "quantity": 20, "unit": "H87", "unit_price": "9.90", "vat_category": "S", "vat_rate": 19, "seller_item_id": "TB100A4", "standard_item_id": {"id": "4012345001235", "scheme": "0160"}}, {"name": "Joghurt Banane", "quantity": 50, "unit": "H87", "unit_price": "5.50", "vat_category": "S", "vat_rate": 7, "seller_item_id": "ARNR2", "standard_item_id": {"id": "4000050986428", "scheme": "0160"}}]}
  }'
200 OKFeRD sample EN16931_Einfach rebuilt from JSON, files shortened
{
  "creator": "einvoice/zugferd@1",
  "result": {
    "valid": true,
    "format": "ZUGFeRD / Factur-X PDF/A-3, profile EN 16931",
    "specification_id": "urn:cen.eu:en16931:2017",
    "filename": "factur-x.xml",
    "pdf_filename": "471102.pdf",
    "totals": {
      "currency": "EUR",
      "line_total": "473.00",
      "allowance_total": "0.00",
      "charge_total": "0.00",
      "total_without_vat": "473.00",
      "vat_total": "56.87",
      "total_with_vat": "529.87",
      "prepaid_amount": "0.00",
      "rounding_amount": "0.00",
      "amount_due": "529.87",
      "vat_breakdown": [
        {
          "category": "S",
          "rate": "19",
          "taxable_amount": "198.00",
          "vat_amount": "37.62"
        },
        {
          "category": "S",
          "rate": "7",
          "taxable_amount": "275.00",
          "vat_amount": "19.25"
        }
      ],
      "lines": [
        {
          "id": "1",
          "net_amount": "198.00"
        },
        {
          "id": "2",
          "net_amount": "275.00"
        }
      ]
    },
    "check": {
      "scenario": "Factur-X EN 16931",
      "document_type": "UN/CEFACT CII",
      "specification_id": "urn:cen.eu:en16931:2017",
      "errors": 0,
      "warnings": 0,
      "notices": 0,
      "error_rules": [],
      "checks": [
        {
          "check": "Embedded invoice",
          "passed": true
        },
        {
          "check": "XML syntax",
          "passed": true
        },
        {
          "check": "Factur-X 1.09.2 EN 16931 schema",
          "passed": true
        },
        {
          "check": "Factur-X 1.09.2 EN 16931 rules",
          "passed": true
        }
      ],
      "messages": [],
      "messages_truncated": false
    },
    "xml": "<?xml version='1.0' encoding='UTF-8'?>\n<rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:ram=\"urn:un:unec… (6,854 characters in all)",
    "pdf": "JVBERi0xLjcKJenr8b8KMSAwIG9iago8PAovQ291bnQgMQovS2lkcyBbNCAwIFJdCi9NZWRpYUJveCBbMCAwIDU5NS4yOCA4NDEuODldCi9UeXBlIC9QYWdlcwo+PgplbmRvYmoKMiAwIG9iago8PAovQWx0ZXJu… (51,492 characters in all)"
  },
  "rules": [
    {
      "name": "Factur-X 1.09.2 / ZUGFeRD 2.5 schemas and Schematron (FNFE-MPE and FeRD), as distributed with Mustang",
      "version": "1.09.2",
      "url": "https://github.com/ZUGFeRD/mustangproject/tree/1d633ab612856527d536a709ed53bedd2a4ea98c/validator/src/main/resources"
    },
    {
      "name": "KoSIT validator configuration for XRechnung 3.0.2",
      "version": "2026-08-31",
      "url": "https://github.com/itplr-kosit/validator-configuration-xrechnung/releases/download/v2026-08-31/xrechnung-3.0.2-validator-configuration-2026-08-31.zip"
    }
  ]
}

MCP tool create_einvoice_zugferd at https://mcp.curatedapi.com. Every input field, the results and the errors in the API reference.

Other e-invoice APIs

Send e-invoices from your app without writing XRechnung yourself

For invoicing apps, shop plugins and ERPs whose customers must send e-invoices: post the invoice as JSON and store or send the file that comes back. Each file has passed the official rules before you get it.

Free for up to 100 invoices created a month. 2,000 invoices created a month cost $9.00 on the Starter plan.