Documentation
Nota Invoice Sync for Lexware Office
Setup, settings and troubleshooting for creating and automating Lexware Office invoices from WooCommerce orders.
🇩🇪 Deutsche Version
Installation
Nota Invoice Sync requires WooCommerce to be installed and active — it declares this as a hard dependency, so WordPress will not let it activate without WooCommerce already running.
Free (WordPress.org)
- In your WordPress admin, go to Plugins → Add New.
- Search for “Nota Invoice Sync for Lexware Office”.
- Click Install Now, then Activate.
Pro
- Download the plugin ZIP from your account after purchasing at wp-nota.com/lexware-invoice-sync.
- Go to Plugins → Add New → Upload Plugin, choose the ZIP, and click Install Now, then Activate.
- If the free edition is already active, Pro detects it automatically and deactivates it on the next admin page load — settings and order↔invoice references are shared, so nothing is lost in the switch.
- Activate your license when Freemius prompts for it. Without an active license or trial, Pro’s automation stays fully dormant and only the free feature set is available.
Connecting Your Lexware Office Account
- Go to WooCommerce → Lexware Invoices.
- Create a personal API key at app.lexware.de/addons/public-api and paste it into the API key field.
- Click Save and test connection.
The connection test also compares your Lexware Office account’s tax configuration against your shop’s own tax table. If your shop charges destination-country VAT for EU orders (One Stop Shop) but your Lexware Office account is set to German VAT, a warning is shown right there — before it turns into a rejected invoice.
Your First Invoice
- Open any WooCommerce order.
- Find the “Lexware Office invoice” panel in the sidebar.
- Click Create invoice now.
The plugin resolves the correct tax treatment, finds or creates the matching Lexware contact by the customer’s email address, and sends the invoice. The resulting invoice number and status appear on the order screen and as their own column on the order list.
Draft vs Finalised
Under Settings → Document mode, choose whether new invoices are created as drafts or finalised immediately:
- Draft (“Entwurf”) — can still be edited or deleted in Lexware Office, is not booked, and has no e-invoice (ZUGFeRD) file yet.
- Finalised — permanent, recorded for GoBD, and the e-invoice document is generated. Can only be reversed with a credit note, never deleted.
Contact Sync
Every invoice references a real Lexware contact rather than a one-time address, because reverse-charge and third-country tax types require it. On each order, the plugin:
- Searches for an existing contact by the customer’s exact email address.
- Creates one if none is found, and stores the contact ID on the order.
- On a later order from the same contact, compares the stored details against the order and updates the contact in Lexware Office if the name or address changed (using Lexware’s optimistic-locking “version” field to avoid conflicts).
Tax Treatment
The correct Lexware tax type is worked out from the order itself:
- Domestic — standard net invoice at your usual VAT rate.
- Intra-community reverse charge — detected when the order carries a VAT-ID and zero tax, matching what common EU VAT plugins produce for a validated B2B customer.
- EU distance sales (OSS) — B2C orders to other EU countries, handled according to your Lexware Office account’s distance-sales setting.
- Third-country export — shipments outside the EU, zero-rated.
- Kleinunternehmer (§19 UStG) — if your Lexware Office account is flagged as a small business, invoices are created without VAT automatically.
The plugin never re-validates or overrides what WooCommerce (or your VAT plugin) already decided — it only translates that decision into the fields Lexware Office expects.
Supply Date & Delivery Range
Lexware Office requires a supply/delivery date (Leistungsdatum) on every invoice. Under Settings → Invoice content:
- Supply date offset — 0 means the supply date matches the order/payment date, correct for most shops. If goods are produced to order, set the typical lead time in days here.
- Delivery range end — leave empty for a single date. Set a value to show a delivery window instead (e.g. “06.07.2026 bis 14.07.2026”).
The invoice date itself is never shifted — only this delivery/service date shown on the document.
Test Mode
Under Settings → Diagnostics, Test mode builds the complete invoice payload and writes it to the log without sending anything to Lexware Office. This applies consistently across the whole plugin — including contact lookups, the daily connection check, and the manual “Check payment status” button. No API request is made anywhere while test mode is on.
Logs appear under WooCommerce → Status → Logs, source “nota-invoice-sync”.
Automatic Invoicing PRO
Under Settings → When to create invoices, choose the order statuses that should trigger an invoice automatically — processing, on hold, completed, or pending for pay-on-invoice shops. The job runs in the background via Action Scheduler, so customers never wait on an API call at checkout.
- A short delay (10 seconds) is applied for most statuses, and a longer one (5 minutes) for “pending”, to let the order settle before it becomes a document.
- Abandoned checkouts are detected and skipped automatically — an order with no payment method, no billing email or no line items is never invoiced.
- An order can never receive two automatic invoices; the already-invoiced check happens under the same lock used by manual creation.
Bulk Actions & Large-Scale Import PRO
Two different tools for two different situations:
- Bulk action — on the order list, select orders and choose “Create Lexware invoice” to queue them right away.
- Large-scale bulk import — under its own admin screen, for invoicing months of existing orders at once. Filter by date range and status, and the importer works through matching orders in small batches (15 orders per tick, a few seconds apart, 90 seconds between ticks) to stay safely under Lexware’s 2 requests/second API limit.
The large-scale importer is resumable: if interrupted, it picks up exactly where it left off, and already-invoiced orders are always skipped.
PDF Delivery & Download PRO
Under Settings → Automation → PDF delivery:
- Attach the invoice PDF to WooCommerce order emails — attached automatically once an invoice is finalised.
- Let customers download the invoice PDF from My Account — off by default. When enabled, a download button appears on the customer’s order view page.
Admins can always download a finalised invoice’s PDF from the order screen, regardless of this setting.
Payment Reminders (Mahnwesen) PRO
Under Settings → Automation → Payment reminders, enable automatic reminders for overdue finalised invoices, with three configurable stages (default 7, 14 and 21 days overdue). Checked once a day; only applies to finalised, unpaid invoices past their payment term. If payment status sync (below) has already seen Lexware Office show that invoice as paid, no further reminder is sent — even before you’ve updated the WooCommerce order status yourself.
Payment Status Sync PRO
Twice a day, the plugin checks whether Lexware Office already shows a finalised invoice as paid and adds an order note when it does.
Refresh Status
The invoice status shown on the order screen (draft/finalised) is recorded once, at the moment the invoice is created. If someone finalises a draft directly in Lexware Office rather than through this plugin, that change isn’t noticed automatically.
- Manual (Free and Pro) — a “Refresh invoice status” button on the order screen re-checks the invoice and updates the stored status/number.
- Automatic (Pro) — the payment status sync cron also sweeps orders still marked “draft” and refreshes them, twice daily.
Credit Notes (Gutschrift) PRO
On the order screen, once an invoice exists, use “Create credit note (full amount)” to issue a Gutschrift against it in Lexware Office.
- Manual (default) — a WooCommerce refund doesn’t always mean a credit note should be issued the same way, so nothing happens automatically unless the option below is turned on.
- Automatic (opt-in) — enable “Automatically create a credit note when an order is refunded” under Settings → Automation. Each refund (full or partial) creates its own credit note for that refund’s own amount; a twice-refunded order gets two credit notes. Only applies to orders that already have a Lexware invoice.
For a partial amount, create the credit note directly in Lexware Office, or use the nota_inv_credit_note_payload filter to customise the amount and line description before it’s sent.
Compliance Export PRO
Under Settings → Diagnostics, a “Compliance export” card lets you download a CSV of every order with a finalised Lexware Office invoice — invoice number, status, e-invoice format, amounts, payment date and any credit notes — for a chosen date range, or everything.
- Sourced entirely from data already stored locally — no Lexware Office request is made, so it works instantly even for a large date range.
- Only finalised invoices are included; drafts aren’t booked yet and would clutter an audit report.
Settings Reference
WooCommerce → Lexware Invoices is organised into sections:
- Connection — API key, save and test connection.
- When to create invoices — trigger statuses (Pro), document mode (draft/finalised).
- Invoice content — language, multilingual detection, payment term, supply date offset, shipping line item, title/introduction/remark text.
- Automation (Pro) — PDF delivery, payment reminders, payment status sync.
- Diagnostics — order notes, test mode, logging, uninstall behaviour.
Troubleshooting
- “No Lexware Office API key has been configured yet” — the key field is empty or wasn’t saved. Re-enter it and click Save and test connection.
- An order won’t invoice, with no visible error — check the order’s currency. Lexware Office invoicing only supports EUR; other currencies are skipped on purpose, with the reason written to the log.
- Tax setup mismatch warning — your shop and your Lexware Office account disagree on OSS/destination-country VAT. See Connecting Your Lexware Office Account above.
- Draft won’t email or can’t be downloaded as PDF — both require a finalised invoice; Lexware Office has no PDF document for drafts.
- Rate limit / 429 errors — the API client already paces requests and retries with backoff; if you see persistent 429s during a large bulk import, let it run — it’s designed to stay under the limit over time.
- Where to look — the order screen shows the last error for that order in the Lexware Office invoice panel. Full logs are under WooCommerce → Status → Logs, source “nota-invoice-sync”.
