Documentation
Back

Lexware

Connect Lexware Office and set up how your orders become invoices there.

Lexware Office, formerly lexoffice, is German cloud accounting software. This page covers connecting your Lexware account to BrickInvoice and setting up how your orders end up there.

Table of Contents

  • Before you start
  • Connecting Lexware
  • Configuring Lexware
  • How orders end up in Lexware
  • Troubleshooting
  • Disconnecting Lexware
  • Tips for your setup
  • Next steps
  • Support

Before you start

You need:

  • a Lexware Office subscription, with admin access to your Lexware account
  • your settings filled in
  • your BrickLink or Brick Owl store connected
  • a Lexware API token (see below)
  • the Articles you want on your invoices created in Lexware (see Tips for your setup)

Connecting Lexware

Create an API token

  1. Log in to Lexware Office at https://app.lexoffice.de.
  2. Go to Settings → Public API.
  3. Create a new API key with these permissions:
    • Retrieve general profile information
    • Retrieve articles
    • Retrieve contacts
    • Save contacts
    • Retrieve invoices
    • Save invoices
  4. Copy the token.

Connect

  1. Go to Accounting → Connect (/home/accounting/connect).
  2. Choose Lexware under Accounting package.
  3. Paste the token into the field.
  4. Click Connect to Lexware Office. BrickInvoice checks the token and saves the connection.

BrickInvoice encrypts your token before storing it, never shares it, and only uses it to talk to Lexware. If you think someone else knows it, create a new one in Lexware.

Configuring Lexware

Go to Accounting → Configuration to choose how your orders are booked.

General settings

Differentiate BrickLink and Brick Owl: tick this to choose separate Articles for BrickLink and Brick Owl orders. Each Article field then becomes two fields side by side, one for BrickLink and one for Brick Owl. That helps when you want to see the sales of each store apart in your accounting. See Platform differentiation.

Title is an optional title for your invoices: fixed text of at most 25 characters, without placeholders.

Introduction text is an optional text at the top of the invoice. You can use these placeholders:

  • {order_number}: the order number, such as 123456
  • {source}: the store, BrickLink or Brick Owl
  • {payment_method}: the payment method, such as PayPal

"Order {order_number} from {source}" becomes "Order 123456 from BrickLink".

Remarks text is an optional closing text, such as "Vielen Dank für Ihre Bestellung!". It takes the same placeholders.

Finalize invoice: when ticked, BrickInvoice finalizes each invoice as soon as it syncs. A finalized invoice gets its official number and cannot be changed or undone. When not ticked, invoices stay drafts that you can still edit in Lexware.

Contact sync options

Update existing contacts: when on (the default), an existing contact in Lexware is updated every time one of their orders syncs, so the name and address match your store. When off, existing contacts are never changed. If the data from BrickLink or Brick Owl then differs from the contact in Lexware, you get a warning in the app that lists the fields that changed, such as street, postal code, city or country. You can then decide whether to update the contact in Lexware yourself.

Sync email addresses: adds the buyer's email address to the contact in Lexware. Turn it on if you send invoices from Lexware by email. Leave it off if you would rather not keep buyers' email addresses in your accounting.

Articles per line

Each order becomes an invoice with a line for each kind of revenue. Lexware puts Articles on the invoice lines, so you choose an Article from your Lexware account for each kind of line and region. The Article's tax code sets the VAT on the line.

Product line items, for goods with normal VAT:

  • Domestic product article: customers in Germany, such as "LEGO Parts - Germany 19%"
  • EU product article: customers in other EU countries, such as "LEGO Parts - EU 19%"
  • Export product article: customers outside the EU, such as "LEGO Parts - Export 0%"

Margin scheme line items, for second-hand goods under the margin scheme, have Domestic margin article, EU margin article and Export margin article.

Shipping line items has one Shipping article for every region, such as "Versandkosten". Other line items (handling fees) has one Handling fees article, such as "Bearbeitungsgebühren". Both usually carry your normal VAT rate.

If you do not want to split domestic and EU sales, choose the same Article for both.

Each card also has an optional Description field for the text on its lines, with the same placeholders as the introduction text. "Products from {source} order {order_number}" becomes "Products from BrickLink order 123456". Leave it empty and no description goes to Lexware.

If you turned on B2B VAT exempt in your settings, each card also has a B2B field: Product article (B2B), Margin article (B2B), Shipping article (B2B) and Handling fees article (B2B). For an order where the VAT is reversed, BrickInvoice uses that Article instead of the normal one. Give the B2B Articles a 0% or reverse charge tax code in Lexware.

How orders end up in Lexware

Invoices

For each order BrickInvoice creates an invoice with a line for each kind of revenue. Lexware shows the amounts as gross prices (Bruttopreise), so each line includes VAT and the invoice total matches the order total. With Finalize invoice on, the invoice is finalized straight away.

BrickInvoice keeps a link to each invoice, so you can open it in Lexware straight from BrickInvoice.

Contacts

For every order BrickInvoice checks whether the buyer already exists as a contact in Lexware. If so, the invoice is linked to that contact. If not, BrickInvoice creates a new contact and links the invoice to it.

Lexware has no field to store a link to a BrickLink or Brick Owl buyer. Instead, every contact BrickInvoice creates carries the buyer's store username in its note, for example BL_username for BrickLink or BO_username for Brick Owl.

Step 1: looking up the buyer

Lexware only searches on names of at least 3 characters, so BrickInvoice searches for existing contacts by:

  1. the buyer's last name, or
  2. the buyer's first name, if the last name is missing or shorter than 3 characters, or
  3. the buyer's email address, if both names are shorter than 3 characters.

If none of these is possible, BrickInvoice creates a new contact without searching.

Step 2: choosing the right contact

The search can return several contacts. A name search also finds contacts whose name only contains the searched name, so searching "Schmid" also finds "Schmidt". BrickInvoice picks the right contact from the results as follows:

  1. By username. A contact whose note holds the buyer's username is the same customer, even if their first name or address has changed since.
  2. By name and country. Otherwise, a contact matches when its first name, last name and country are all the same as in the order. Differences in capitals or spaces are ignored, but a different spelling is not: "Schmid" and "Schmidt" are different customers. Contacts whose note holds a different username are skipped, because they belong to another buyer. Company contacts are only recognized by username.

If no contact matches, BrickInvoice creates a new one.

Step 3: what happens with an existing contact

  • With Update existing contacts on, BrickInvoice overwrites the contact's name, address and note with the data from the order, and the email address as well if Sync email addresses is on. Any text you wrote in the note yourself is replaced by the username.
  • With Update existing contacts off, the contact is left unchanged. If the order data differs, you get a warning listing the differences. Email addresses are only compared when Sync email addresses is on. The invoice shows the contact as it is stored in Lexware.

What this means for you

  • A customer whose last name has changed is usually not found by the search, so BrickInvoice creates a new contact for them.
  • Two different customers with the same first name, last name and country are treated as the same customer if the contact in Lexware has no username in its note. This mainly applies to contacts you created in Lexware yourself. Add the username to the note of such a contact (for example BL_username) to rule this out.

Troubleshooting

Connecting fails

Check that you copied the token correctly and that it has every permission listed under Create an API token. Also check your internet connection and Lexware's service status.

Your token is refused

A token stops working once you create a new one in Lexware, so connect again with the new token. Also check that your Lexware subscription is active and that the token still has every permission it needs.

Articles do not load

Check that Lexware is still connected, that your token has the Retrieve articles permission, and that you created Articles in Lexware. Then reload the configuration page.

An invoice is not created

Check that every required Article is chosen in the configuration and that each Article has a valid tax code in Lexware. A missing name or address on the order can also stop the invoice.

Disconnecting Lexware

  1. Go to Accounting → Connect.
  2. Click Disconnect Lexware.
  3. Click Yes, disconnect in the dialog.

BrickInvoice removes the connection and your stored API token, and clears your accounting configuration, so after reconnecting you set it up again. Invoices and contacts already in Lexware stay where they are. To use a new API token, disconnect and connect again with the new token. See Changing or disconnecting your package.

Tips for your setup

Kleinunternehmer

If you are registered as a small business owner (Kleinunternehmer) in Lexware, your invoices are exempt from VAT under §19 UStG.

Lexware Kleinunternehmer Setting

With that setting on in Lexware, turn off VAT in BrickInvoice as well:

  1. Go to Settings → Tax & business.
  2. Under VAT registration, untick My business is VAT-registered.
  3. Click Save settings.

BrickInvoice then creates invoices with taxType: vatfree, which matches your Kleinunternehmer status in Lexware. Every line goes to Lexware as a net amount with 0% tax.

VAT for a German business

Normal sales in Germany and to the EU carry 19% Umsatzsteuer. Export sales outside the EU use 0%. Goods under the margin scheme (Differenzbesteuerung) use 0%.

Articles in Lexware

Create the Articles in Lexware before you configure BrickInvoice, one for each kind of line and region, each with the right tax code. Clear names such as "LEGO Parts - Domestic 19%" make them easy to find in BrickInvoice and in your reports. For example:

Articles in Lexware:
├── LEGO Parts - Domestic (19% VAT)
├── LEGO Parts - EU (19% VAT)
├── LEGO Parts - Export (0% VAT)
├── Margin - Domestic (0% Margin)
├── Margin - EU (0% Margin)
├── Margin - Export (0% Margin)
├── Versandkosten (19% VAT)
└── Bearbeitungsgebühren (19% VAT)

With Differentiate BrickLink and Brick Owl on, you can use separate Articles per store. That lets you see the revenue of each store apart, book it on different ledger accounts, and run reports per store in Lexware:

Articles in Lexware:
├── BrickLink - Domestic (19% VAT)
├── BrickLink - EU (19% VAT)
├── BrickLink - Export (0% VAT)
├── Brick Owl - Domestic (19% VAT)
├── Brick Owl - EU (19% VAT)
├── Brick Owl - Export (0% VAT)
├── Versandkosten BL (19% VAT)
├── Versandkosten BO (19% VAT)
└── ... (repeat for margin scheme and handling fees)

Next steps

  1. Sync a few orders as drafts and check the invoices in Lexware.
  2. Check that each line has the right tax code for the customer's country.
  3. Turn on the accounting schedule so new orders sync on their own.

Support

If something goes wrong with Lexware, reach us through the contact form.