Lexies for Craft CMS

Installation

Requirements

  • Craft CMS 5.3 or later
  • Craft Commerce 5.0 or later
  • PHP 8.2 or later, with ext-openssl
  • A Lexware Office account that can create a Public API key

Lexware Office issues vouchers in EUR only. A store selling in another currency can install Lexies, but every order in that currency will be refused rather than converted.

Install

composer require justinholtweb/craft-lexies
php craft plugin/install lexies

Or find Lexies in the Craft Plugin Store and install it from there.

Get an API key

  1. In Lexware Office, go to Erweiterungen → Public API (app.lexware.de/addons/public-api).
  2. Create a key and copy it.
  3. Put it in your .env rather than in project config — it is a bearer token over your whole books:

    LEXWARE_API_KEY="your-key"
    
  4. In Craft, go to Settings → Plugins → Lexies, set API key to $LEXWARE_API_KEY, and save.

Test the connection

Press Test connection on the settings screen. It reads your Lexware profile and tells you three things that every later decision depends on:

  • which organisation the key belongs to
  • your configured tax type — net, gross or VAT-free
  • whether the organisation is registered as a small business (§19 UStG), in which case no invoice will ever show VAT

The test reads the key that is stored, so save before you press it.

Nothing is finalised until you say so

Lexies installs with Finalise invoices off, so the first invoices arrive in Lexware as drafts. That is deliberate. Finalising allocates the consecutive voucher number German bookkeeping runs on, and a finalised invoice can never be edited or deleted afterwards — only voided.

Leave it off until you have looked at a few real invoices in Lexware.

Your first invoice

Preview one before you send anything:

php craft lexies/sync/order 1234 --dry-run

That prints the tax reasoning, the order total next to the invoice total, and the exact JSON that would be sent. Nothing is written and no API call creates anything.

When it looks right, complete a test order — or invoice the orders you already have:

php craft lexies/sync/backfill --limit=50

Editions

Lite is free and is not a trial: it is a complete invoicing integration for a German shop selling to German customers. Pro is $99 with a $49/year renewal, and adds everything that needs Lexies to hold state about a customer, or to listen for something coming back.

LitePro
PriceFree$99, $49/year renewal
Invoices from completed orders
Draft or finalised
Automatic tax type per order
Reconciliation guard
PDF download in the control panel
Backfill, preview and reconcile from the console
Lexware contacts per customer
Intra-community and third-country invoices
OSS distance sales with destination VAT rates
Webhooks — Lexware tells you when an invoice is paid
Record that payment as a Commerce transaction
Credit notes when a refund is captured
Customer-facing invoice download
Request and response bodies in the log
Trigger on an order status instead of completion

Intra-community and third-country invoices are Pro for a reason rather than as a lever: Lexware requires an invoice with those tax types to reference a real contact, and creating contacts is the Pro feature. Lite blocks those orders with an explanation instead of quietly taxing them wrongly.

Next

  • Configuration — every setting, and which ones matter
  • Usage — what happens on checkout, and the console commands