The E-Invoicing Engine
for Developers
JSON in, PDF/A-3 out.
EN 16931 compliant. No data stored. Ever.
Get notified when we launch
How It Works
Generate and retrieve. Complete roundtrip for EU-compliant e-invoices.
Example shown: ZUGFeRD 2.3 (Germany). Also supports: Factur-X, XRechnung, Peppol, FatturaPA, UBL, CII, and plain PDF. See all formats →
Send JSON
POST your invoice data as simple JSON. Seller, buyer, items, taxes.
curl -X POST api.thelawin.dev/v1/generate \
-H "X-API-Key: your_key" \
-d '{
"format": "zugferd",
"invoice": {
"number": "RE-2026-001",
"seller": {"name": "Acme GmbH"},
"items": [{"description": "Consulting"}]
}
}'
We Process
Generate PDF/A-3 with embedded XML. EN 16931 validated.
Receive PDF
Base64-encoded PDF in JSON response. Decode and save locally.
{
"pdf_base64": "JVBERi0xLjcK...",
"filename": "rechnung-2026-001.pdf"
}
# Save as PDF
echo $response | jq -r .pdf_base64 | \
base64 -d > invoice.pdf
The reverse path: upload existing e-invoices and get structured JSON back. Perfect for validation, import, or format conversion.
Note: This is metadata extraction, not OCR. Only valid e-invoice formats with embedded XML (ZUGFeRD, Factur-X, XRechnung, UBL, CII, Peppol, FatturaPA) are supported.
Upload PDF or XML
Send your ZUGFeRD PDF, Factur-X PDF, or standalone XML (UBL, CII, FatturaPA).
curl -X POST api.thelawin.dev/v1/retrieve \
-H "X-API-Key: your_key" \
-d '{
"data_base64": "JVBERi0xLjcK...",
"content_type": "application/pdf"
}'
We Extract & Validate
Detect format, extract embedded XML, parse invoice data, validate against EN 16931.
Receive JSON
Same JSON format as /generate input. Complete roundtrip!
{
"valid": true,
"format": {"detected": "zugferd"},
"invoice": {
"number": "RE-2026-001",
"seller": {...},
"items": [...]
}
}
Check incoming invoices for EN 16931 compliance
Parse invoice data into your accounting system
Retrieve → modify → generate in a different format
What We Handle For You
Focus on your business logic. We take care of the complex e-invoicing infrastructure.
One Simple JSON → Any EU-Compliant Format
Create your invoice data once in JSON. We transform it into ZUGFeRD, Factur-X, XRechnung, Peppol, or any other format you need. Legally compliant, always up-to-date.
Non-EU? Plain PDF from JSON
No e-invoicing mandate in your country yet? We also generate clean, professional PDFs from your JSON data. Perfect for USA, Canada, Asia, and other regions. Same API, same simplicity.
PDF Generation Libraries
No need to maintain iText, PDFBox, or other PDF libraries. We handle all PDF/A-3 generation.
XML Validation & Schema
Complex XML schema validation, CII/UBL transformations, and syntax checks all built-in.
EN 16931 Compliance Updates
Standard updates, new rules, format changes - we track and implement them automatically.
Multi-Format Logic
9 different output formats from one input. No custom code for ZUGFeRD vs. Factur-X vs. Peppol.
Data Privacy & Residency
Stateless processing means no storage, no GDPR headaches, no data residency compliance overhead.
Infrastructure Scaling
Peak invoice periods, end-of-month rush - our infrastructure scales automatically for you.
9 EU Standards Supported
One API for all European e-invoicing formats. From Germany to Italy, B2B to B2G.
Germany
XRechnung required for public sector since Nov 2020. ZUGFeRD recommended for B2B.
France
Mandatory for B2G. B2B rollout 2024-2026. Submitted via Chorus Pro portal.
Italy
Requires SDI submission. Needs codice fiscale + codice destinatario or PEC. Mandatory since Jan 2019.
EU & International
Peppol used in EU, UK, Australia, Singapore, New Zealand. UBL is EN 16931 foundation.
Smart Format Detection
Set "format": "auto" and we'll choose the right standard based on country codes, buyer type, and required fields. Germany B2G? XRechnung. France B2B? Factur-X. Italy? FatturaPA.
Stateless by Design
Your invoice data never touches our disk. Send JSON, receive PDF.
Ruby SDK Available
gem install thelawin ready now. Other languages via REST API (TypeScript, Python SDKs in development).
AI-Ready (MCP)
Native Model Context Protocol. Let Claude or GPT generate invoices.
Simple, Transparent Pricing
Developer-friendly plans. Pay only for what you use.
1 credit = 1× /generate or /retrieve. /validate is free.
Sandbox
Free forever
Need production invoices?
€4.90 / 100 credits (no watermark)
Perfect for testing and development.
Starter
Beta pricing until Q2 2026
Ideal for small businesses and freelancers.
Pro
Beta pricing until Q2 2026
For growing businesses with higher volume.
Need more? Enterprise plans with volume discounts available.
Frequently Asked Questions
Common questions about thelawin.dev
What is thelawin.dev?
thelawin.dev is a Micro SaaS that serves as a drop-in replacement for EU-compliant e-invoicing. Send JSON via REST API, receive a valid PDF/A-3 with embedded XML.
Do you have a service or library somewhere in your infrastructure that creates PDF invoices from your data but isn't ready for EN 16931? thelawin.dev is your drop-in replacement.
Why do I need e-invoicing?
The EU mandates electronic invoicing for B2G (business-to-government) and increasingly B2B transactions. Germany: B2G since 2020, B2B receiving from Jan 2025, issuing from 2027. France: Sept 2026/2027. Italy: since 2019.
Think of the XML attachment as a "digital package insert" for your invoice – machine-readable, legally compliant, and required for doing business in the EU.
Who is this for?
Anyone who generates invoices programmatically:
- Enterprises – Replace complex on-premise PDF libraries
- SaaS providers – Add compliant invoicing to your platform
- Freelance developers – Simple API, no infrastructure to maintain
- AI agents – Native MCP support for Claude and other LLMs
The Micro SaaS approach means pay only for what you use, from 0 to 2,000+ credits/month.
How do you handle my invoice data?
We don't store it. Ever. thelawin.dev is truly stateless:
- Your invoice data is processed entirely in RAM
- PDF is generated and returned immediately as Base64
- Nothing is written to disk, no database storage
- Only usage counters (no content) are logged for billing
Billing via Paddle.com (Merchant of Record) ensures EU VAT compliance without us handling payment data.
Which formats do you support?
9 EU-compliant formats from a single JSON input:
Use "format": "auto" and we'll pick the right one based on country codes.
How easy is the integration?
One POST request. That's it.
- Test client built into this website – try before you code
- Ruby SDK available now (
gem install thelawin) - TypeScript & Python SDKs coming soon
- OpenTelemetry support for monitoring and tracing
- MCP server for AI agent integration
Most integrations take less than an hour.
Can I try it for free?
Yes, forever. The Sandbox plan is free with 100 credits/month.
- Full API access to all 9 formats
- Same validation and generation as paid plans
- PDFs include a "SANDBOX" watermark
- Perfect for development and testing
/validateis always free (doesn't use credits)
Why "thelawin"?
"Lawin" is Scots for "the bill" or "the tab" – as in "What's the lawin', lass?" It's our way of saying: asking for the bill should be as simple as an API call.
When does the e-invoicing mandate apply in Germany?
E-Rechnungspflicht timeline:
- Jan 2025: All German businesses must be able to receive e-invoices
- Jan 2027: Large businesses must send e-invoices (B2B)
- Jan 2028: All businesses must send e-invoices
thelawin.dev supports both ZUGFeRD (B2B) and XRechnung (B2G) to ensure full compliance.
Is thelawin.dev KoSIT compliant?
Yes. All XRechnung invoices generated by thelawin.dev are validated against the official KoSIT Schematron rules (Koordinierungsstelle für IT-Standards).
This ensures full EN 16931 compliance and acceptance by German government portals like ZRE (Zentrale Rechnungseingangsplattform) and OZG-RE.
Does thelawin.dev support Chorus Pro (France)?
Yes. We generate Factur-X 1.0 invoices that are fully compatible with the French B2G portal Chorus Pro.
Important: France introduces mandatory e-invoicing (facturation électronique) in September 2026 for large enterprises, with full B2B coverage by 2027.
thelawin.dev generates PDF/A-3 with embedded CII XML, meeting all Factur-X EN16931 profile requirements.
Can I create FatturaPA invoices for Italy?
Yes. thelawin.dev supports FatturaPA 1.2.2 with all required fields for submission to the SDI (Sistema di Interscambio).
We handle Italian-specific requirements including:
- Codice Destinatario – 7-character recipient code
- Codice Fiscale – Italian tax ID
- Partita IVA – VAT number formatting
- PEC – Certified email address support
Does thelawin.dev offer an e-invoice validator?
Yes! The /validate endpoint
validates e-invoices against EN 16931 compliance – and it's always free.
The validator supports:
- ZUGFeRD 2.x – PDF with embedded CII XML
- XRechnung 3.0 – UBL XML (KoSIT Schematron rules)
- Factur-X – French standard validation
- FatturaPA – Italian SDI format
- Peppol BIS 3.0 – Cross-border EU invoices
thelawin.dev