Project

thelawin

0.0
No release in over 3 years
Generate ZUGFeRD/Factur-X/XRechnung/Peppol/FatturaPA compliant invoices with a simple API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.12
~> 1.50
~> 3.18

Runtime

~> 0.2
~> 2.0
 Project Readme

thelawin.dev Client Libraries

Official client libraries for the thelawin.dev ZUGFeRD/Factur-X E-Invoicing API.

Generate EU-compliant e-invoices with a simple, consistent API across all languages.

Available SDKs

Language Package Install
TypeScript/JavaScript @thelawin/sdk npm install github:steviee/thelawin-clients#path:typescript
Python thelawin pip install git+https://github.com/steviee/thelawin-clients.git#subdirectory=python
Ruby thelawin gem install thelawin (RubyGems)
Kotlin dev.thelawin:sdk JitPack or local build
Java dev.thelawin:sdk JitPack or local build
Swift Thelawin SPM: https://github.com/steviee/thelawin-clients.git
Dart thelawin Git dependency (see dart/README)
C# Thelawin Local build or Git submodule

Quick Start

All SDKs share the same fluent API design:

// JavaScript/TypeScript
import { ThelawinClient } from '@thelawin/sdk';

const client = new ThelawinClient('env_sandbox_demo');

const result = await client.invoice()
  .number('2026-001')
  .date('2026-01-15')
  .format('zugferd')
  .seller({ name: 'Acme GmbH', vatId: 'DE123456789', city: 'Berlin', country: 'DE' })
  .buyer({ name: 'Customer AG', city: 'Munich', country: 'DE' })
  .addItem({ description: 'Consulting', quantity: 8, unit: 'HUR', unitPrice: 150 })
  .template('minimal')
  .generate();

if (result.success) {
  result.downloadPdf();  // Browser: triggers download
} else {
  result.errors.forEach(e => console.error(`${e.path}: ${e.message}`));
}

Features

  • 9 Formats - ZUGFeRD, Factur-X, XRechnung, Peppol, FatturaPA, UBL, CII, PDF
  • Fluent Builder API - Chain methods to build invoices
  • Retrieve - Extract invoice data from existing PDFs/XMLs
  • Logo Support - Load logos from files or URLs (auto Base64 encoding)
  • Error Handling - Detailed validation errors with JSON paths
  • Type Safety - Full TypeScript/type hint support
  • Browser + Server - Works in browsers and server environments

API Key

Get your API key at thelawin.dev/signup

  • Demo key (env_sandbox_demo): Free, no account needed, watermarked
  • Sandbox keys (env_sandbox_*): Free, 100 credits/month, watermarked
  • Live keys (env_live_*): Production use, requires paid plan

Documentation

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT License - see LICENSE for details.