PDF Generator API

E-invoice API

E-invoice API for XRechnung, Factur‑X and ZUGFeRD

Send JSON, get a compliant XRechnung or Factur‑X file back. The API handles the XML schemas and the hybrid PDF, so you skip a custom build for each country.

14 day Sandbox with the full API. No credit card.

POST /einvoice/facturx
{
  "template": { "id": 1234567,
    "data": { "...": "..." } },
  "profile": "en16931",
  "output": "base64"
}
Factur-X invoice with the EN 16931 XML embeddedfactur-x.xml inside
POST /einvoice/xrechnung
{
  "data": { "...": "..." },
  "type": "UBL",
  "output": "base64"
}
<ubl:Invoice>
  <cbc:CustomizationID>
    urn:cen.eu:en16931:2017
    #compliant#urn:xeinkauf.de:
    kosit:xrechnung_3.0
  </cbc:CustomizationID>
  <cbc:ID>RE-2026-114</cbc:ID>
  <cac:LegalMonetaryTotal>
    <cbc:PayableAmount>
      5106.20
  ...
</ubl:Invoice>
POST /einvoice
{
  "data": { "...": "..." },
  "type": "CII",
  "output": "file"
}
<rsm:CrossIndustryInvoice>
  <ram:GuidelineSpecified
    DocumentContextParameter>
    <ram:ID>
      urn:cen.eu:en16931:2017
    </ram:ID>
  ...
  <ram:ID>RE-2026-114</ram:ID>
  ...
</rsm:CrossIndustryInvoice>

You send JSON, the API returns the file. The visible invoice is an example from our free template library.

1,500+
companies trust us

6M+
documents generated monthly

Information security

Trusted by teams featured in our case studies

The basics

What e-invoices are and why your business needs them

Electronic invoicing is the exchange of a structured invoice document in an integrated electronic format.

Unlike a standard PDF or a scanned paper invoice, a true e-invoice carries structured data, usually XML, that accounting and ERP systems process automatically, with no manual data entry.

As governments across Europe move toward mandatory digital reporting, compliant e-invoicing has shifted from a technical convenience to a legal requirement for B2G and B2B. For country details, see our guides for France and Germany.

Mandates, as of November 2026

  1. GermanyAll companies must be able to receive e-invoices
  2. BelgiumStructured B2B e-invoices are mandatory
  3. FranceAll companies receive. Large and mid sized companies issue
  4. GermanyCompanies with turnover above €800,000 issue
  5. FranceSmall and micro companies issue
  6. GermanyAll companies issue

How it works

How the e-invoice API turns JSON into XRechnung or Factur‑X

You do not build an XML engine. Map your fields once, call the endpoint, and receive a validated, compliant file.

Send your JSON

Post the invoice data you already have. The payload follows the Peppol BIS Billing 3.0 invoice model, and GET /einvoice/schema returns the exact structure.

No XML knowledge neededYou map your fields once. The API writes the XML.

{
  "data": {
    "invoice_number": "...",
    "seller": { "...": "..." },
    "lines": [ ... ]
  }
}
// shape: GET /einvoice/schema

Pick a format

Choose UBL or CII, XRechnung, or a Factur‑X profile in one parameter. For Factur‑X you also send the id of the template that draws the visible invoice.

Get a compliant file

The API returns the file as base64 or as a download, for example a Factur‑X PDF with the XML embedded, ready to send or archive.

Validated on the way outEvery file is checked against the EN 16931 schema before it is returned.

Generated Factur-X invoiceRE-2026-114.pdf

Formats

E-invoice formats the API generates

XRechnung, ZUGFeRD, Factur‑X, UBL and CII all implement the European EN 16931 model, so you map your data once.

Format Type Used in What it is
Factur‑X Hybrid PDF France and Germany A PDF/A-3 invoice your customer reads, with the EN 16931 XML embedded. Try the Factur‑X API
ZUGFeRD Hybrid PDF Germany The German hybrid standard, compatible with Factur‑X from version 2.1.
XRechnung XML Germany, B2G and B2B Pure XML with no PDF layer, the format German public authorities require. Try the XRechnung API
UBL XML Across Europe, Peppol Universal Business Language, carried over the Peppol network.
CII XML EDI flows UN/CEFACT Cross Industry Invoice, the syntax inside Factur‑X and ZUGFeRD.
EN 16931 Model The whole EU The semantic model behind every format. Map your data once, output any of them.

No code

E-invoices without code in n8n

Connect your ERP or billing tool to the E-Invoice API with our n8n integration and generate compliant e-invoices from a webhook.

  1. Trigger on a new invoice in your ERP or billing tool
  2. Map the fields to the e-invoice JSON once
  3. Call the E-Invoice API node and store or send the file

Watch the two minute walkthrough, then read the full n8n guide. Building it into your own ERP? See e-invoice infrastructure for ERPs.

Partner program

PDF API partner program for platforms, ISVs and agencies

Partner through a revenue share, partner pricing or a white label deployment. We built the integrations below ourselves, and each one has its own page and tutorial.

Partners and integrations 20+ partners and integrations

See every integration →

Logos belong to their owners and show platforms with a PDF Generator API integration, not members of the partner program. SaaS and ERP vendors can also embed the white label editor with a workspace per customer.

Features

E-invoice API features

What the E-Invoice API includes on every plan.

  • EN 16931 standard compliance
  • XRechnung XML generation
  • Factur‑X hybrid PDF/A-3
  • JSON to XML mapping
  • Automatic schema validation
  • Secure data processing
  • Universal UBL and CII support
  • Embedded metadata and archiving
  • Developer friendly API v4
Michal Líška

Questions about the E-Invoice API?

I will walk you through the endpoints, the formats and your compliance timeline in a quick call, or point you to the right guide for your country.

Michal Líška, COO, PDF Generator API

Questions

E-Invoice API FAQ

Formats, EN 16931, the country mandates and the no code route.

Which formats does the E-Invoice API support?
One API generates EN 16931, XRechnung, ZUGFeRD, Factur‑X, UBL and CII from the same JSON data, ready for B2G and B2B mandates across Europe.
What is EN 16931?
EN 16931 is the European semantic standard for electronic invoices. XRechnung, ZUGFeRD, Factur‑X, UBL and CII all implement this same model, so once your data is mapped you can output any of them.
What is the difference between XRechnung, ZUGFeRD and Factur‑X?
XRechnung is pure XML, used mainly for German public authorities. ZUGFeRD and Factur‑X are hybrid formats, a readable PDF/A-3 with the EN 16931 XML embedded. ZUGFeRD and Factur‑X are technically compatible.
Does the API cover the French, Belgian and German mandates?
Yes. You can generate Factur‑X for France, UBL for Belgium and the Peppol network, and XRechnung or ZUGFeRD for Germany, all EN 16931 compliant. The key dates are in the timeline at the top of this page.
Do I need to know XML?
No. You send standard JSON and the API produces the validated, compliant XML or hybrid PDF for you. No XML schema knowledge is required.
Can I generate e-invoices without code?
Yes. Use our n8n integration to connect your ERP or billing tool by webhook and generate compliant e-invoices with no custom code.

Sandbox

Generate your first e-invoice today

The Sandbox gives you the full API, including the e-invoice endpoints, for 14 days with no credit card. Plans are on the pricing page.