Skip to content

thelawin.dev Documentation

Welcome to the thelawin.dev API documentation. Generate EU-compliant ZUGFeRD and Factur-X invoices with a simple REST API.

Quick Start

New to thelawin.dev? Start with the Getting Started Guide.

What is thelawin.dev?

thelawin.dev is a developer-first API for generating electronic invoices that comply with European standards:

  • EN 16931 - EU Core Invoice specification
  • ZUGFeRD 2.3 - German e-invoice standard
  • Factur-X 1.0 - French/EU standard

Key Features

FeatureDescription
Truly StatelessYour invoice data is never stored. PDF returned as Base64.
3 TemplatesMinimal, Classic, and Compact designs
Built-in ValidationValidate existing PDFs for compliance
8 Official SDKsTypeScript, Python, Ruby, Kotlin, Java, Swift, Dart, C#
MCP ServerAI integration for Claude, GPT, and more

API Overview

Generate Invoice

bash
curl -X POST https://api.thelawin.dev/v1/generate \
  -H "X-API-Key: env_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "template": "minimal",
    "invoice": {
      "number": "2026-001",
      "date": "2026-01-15",
      "seller": {"name": "Acme GmbH", "vat_id": "DE123456789", "city": "Berlin", "country": "DE"},
      "buyer": {"name": "Customer AG", "city": "München", "country": "DE"},
      "items": [{"description": "Consulting", "quantity": 8, "unit": "HUR", "unit_price": 150, "vat_rate": 19}]
    }
  }'

Validate PDF

bash
curl -X POST https://api.thelawin.dev/v1/validate \
  -H "X-API-Key: env_live_..." \
  -F "file=@invoice.pdf"

Next Steps

ZUGFeRD 2.3 & Factur-X 1.0 compliant