Documentation
Back

wFirma

Connect wFirma and set up how your orders become invoices there.

wFirma is Polish cloud accounting software, used by many small businesses and freelancers in Poland. This page covers connecting your wFirma account to BrickInvoice and setting up how your orders end up there.

Table of Contents

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

Before you start

You need:

  • a wFirma subscription, with admin access to your wFirma account
  • your settings filled in
  • your BrickLink or Brick Owl store connected
  • the Goods you want on your invoices created in wFirma (see Tips for your setup)

Connecting wFirma

Create your API keys

  1. Log in to wFirma at https://www.wfirma.pl.
  2. Go to Settings → Security → Applications.
  3. Create an Access Key and a Secret Key, and copy both.
  4. Note your company ID. You find it in your wFirma account settings.

Connect

  1. Go to Accounting → Connect (/home/accounting/connect).
  2. Choose wFirma under Accounting package.
  3. Paste the keys into Access key and Secret key.
  4. Click Test connection. BrickInvoice shows whether the test succeeded.
  5. Click Save connection. This button only becomes active after a successful test.

BrickInvoice encrypts your keys before storing them, never shares them, and only uses them to talk to wFirma. If you think someone else knows them, create new ones in wFirma.

Configuring wFirma

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

General settings

Company is the wFirma company where your invoices are created.

Differentiate BrickLink and Brick Owl: tick this to choose separate Goods for BrickLink and Brick Owl orders. See Platform differentiation.

Contact sync options

Update existing contacts: when on, an existing contractor is updated with the data from the new order. When off, existing contractors are never changed.

VAT codes

Under VAT code configuration you choose a wFirma VAT code per kind of sale:

  • Standard VAT code: domestic and EU sales of normal goods. In Poland usually 23%.
  • Export VAT code: every line for a customer outside the EU, usually 0%.
  • Margin scheme VAT code: second-hand goods under the margin scheme, usually 0% or a special margin rate. Only needed if you use the margin scheme.
  • B2B exempt VAT rate: the 0% reverse charge code, for sales to other VAT-registered businesses. You only see it when B2B VAT exempt is on in your settings. On a B2B exempt order, this code goes on every line and wins over the other codes.

Goods per line

Each order becomes an invoice with a line for each kind of revenue. wFirma puts Goods on the invoice lines, so you choose a Good from your wFirma account for each kind of line and region.

Product line items, for goods with normal VAT:

  • Domestic product good: customers in Poland, such as "LEGO Parts - Poland 23%"
  • EU product good: customers in other EU countries, such as "LEGO Parts - EU 23%"
  • Export product good: 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 good, EU margin good and Export margin good. You only need these if you use the margin scheme.

Shipping line items has one Shipping good for every region, such as "Shipping Costs". Other line items (handling fees) has one Handling fees good, such as "Handling Fees". Both usually carry your normal VAT rate.

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

Line descriptions

Each card has a Description field for the text on its lines. You can use these placeholders:

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

"Order {order_number} from {source}" becomes "Order 123456 from BrickLink". Some ideas:

  • products: "LEGO Parts" or "Order {order_number} - Products"
  • margin: "Margin Scheme Product" or "Margin - {source} order {order_number}"
  • shipping: "Shipping" or "Delivery"
  • handling fees: "Handling Fees" or "Processing fees"

How orders end up in wFirma

Contractors

wFirma calls customers contractors. BrickInvoice looks for an existing contractor by the BrickLink or Brick Owl username, so it does not create duplicates. If there is none, it creates one with the billing address from the order. An existing contractor is updated when their data changes, unless you turned off Update existing contacts.

Invoices

For each order BrickInvoice creates a draft invoice with a line for each kind of revenue. Each line gets its VAT from the customer's country and the Good you chose.

Troubleshooting

Connecting fails

Check that you copied the Access Key and Secret Key correctly and that API access is on in your wFirma account. Also check your internet connection and wFirma's service status.

Your keys are refused

Keys stop working once you create new ones in wFirma, so connect again with the new keys. Also check that your wFirma subscription is active and that your wFirma user may use the API.

Goods do not load

Check that wFirma is still connected, that your wFirma user may see Goods, and that you created Goods. Then reload the configuration page.

An invoice is not created

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

Error messages

  • Good not found: a Good you chose was deleted or made inactive in wFirma. Choose another one in the configuration.
  • VAT code not valid: the validity period of a VAT code in wFirma has ended. Update the VAT code in wFirma, or choose Goods with a valid code.

Disconnecting wFirma

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

BrickInvoice removes the connection and your stored API keys, and clears your accounting configuration, so after reconnecting you set it up again. Invoices and contractors already in wFirma stay where they are. To use new API keys without losing your settings, use Change connection instead. See Changing or disconnecting your package.

Tips for your setup

VAT for a Polish business

Normal sales in Poland and to the EU carry 23% VAT. For business customers in the EU, wFirma handles the reverse charge. Export sales outside the EU use 0%. Goods under the margin scheme use 0% or a margin rate.

Goods in wFirma

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

Goods in wFirma:
├── LEGO Parts - Domestic (23% VAT)
├── LEGO Parts - EU (23% VAT)
├── LEGO Parts - Export (0% VAT)
├── Margin - Domestic (0% Margin)
├── Margin - EU (0% Margin)
├── Margin - Export (0% Margin)
├── Shipping (23% VAT)
└── Handling Fees (23% VAT)

Next steps

  1. Sync one order and open the draft invoice in wFirma. Check the contractor, the Good on each line and the VAT amounts.
  2. Sync a few more orders with customers in different countries.
  3. Turn on the accounting schedule so new orders sync on their own.

Support

If something goes wrong, check your API keys, your Goods and their VAT codes, and the customer data on the order. If you still need help, reach us through the contact form and include the error message.