Magento 2 makes its own invoices and credit memos, but e-conomic is where your books are. So every order must also become an invoice in e-conomic, with the same amount, the right VAT and the right VAT zone. This guide shows how to make Magento 2 and e-conomic agree: the settings in Magento, one invoice per order, a worked example, OSS and the mistakes that most often cause differences.
Start in Magento 2: the tax settings
The invoices in e-conomic are never better than the VAT in the shop. Under Stores → Configuration → Sales → Tax, these must be right:
- Catalog Prices: including or excluding tax. Most Danish shops enter prices including VAT. The invoice in e-conomic must then be worked out excluding VAT from them, and the rounding must give exactly what the customer paid.
- Tax Class for Shipping. If it is set to "None", the shop sells shipping without VAT. It is one of the most common mistakes in Danish Magento shops. Shipping normally carries the same VAT as the goods.
- Tax Calculation Based On. For sales to consumers in other EU countries, the country of delivery decides the VAT, so "Shipping Address" is usually the right choice.
- Tax Rules and Tax Zones and Rates. At least a 25% rate for Denmark, a product tax class without VAT for VAT-exempt goods and, if you are above the OSS threshold, a rate for each EU country you sell to.
One invoice per order
Each Magento order should become one invoice in e-conomic:
- The customer is found or created as a debtor with the billing address from the order.
- The lines come with product number (SKU), quantity and price excluding VAT, so the sale lands in the right product group.
- Discounts from coupons and price rules stand as list price and percentage, so the customer can see what was given.
- Shipping gets a line of its own with the same VAT as the goods.
- The total is checked against the order's "Grand Total" in Magento, to the øre.
Magento's own invoice is a receipt for the customer. The invoice that is booked is the one in e-conomic. Decide which of them the customer receives, so that two invoice numbers never go out for the same sale.
Example: order 000001042
Two sets of ceramic cups at DKK 299.00, three bags of coffee beans at DKK 119.00 and a coffee pot at DKK 449.00 with 20% off from a coupon, plus shipping at DKK 49.00. Prices include VAT, and the customer pays DKK 1,363.20:
| Line | Qty | Amount excl. VAT |
|---|---|---|
| Ceramic cups, set of 4 | 2 | 478.40 |
| Coffee beans, 500 g | 3 | 285.60 |
| Coffee pot, glass (list price 359.20, discount 20%) | 1 | 287.36 |
| Shipping | 1 | 39.20 |
| VAT 25% | 272.64 | |
| Total | 1,363.20 |
The invoice in e-conomic ends at exactly what the customer paid in Magento. Had the shipping been sold without VAT, the invoice would still match the total, but the VAT would be DKK 9.80 too low.
VAT for other EU countries and OSS
If you sell to consumers in other EU countries, one threshold of EUR 10,000 a year applies to all your distance sales in the EU:
- Below the threshold you charge Danish VAT, also to customers in Germany or Sweden. The invoice is an ordinary domestic invoice with 25% VAT.
- Above the threshold you must charge the buyer's country's VAT, such as 19% in Germany, and report it through the One-Stop-Shop (OSS). Magento then needs a rate for each country, and in e-conomic you use a VAT zone per country, so OSS VAT is kept apart from Danish VAT.
- Business customers in the EU with a valid VAT number are normally invoiced without VAT under the reverse charge. Magento 2 can check VAT numbers itself in the EU's VIES register and move the customer to a customer group without VAT. It is turned on under Stores → Configuration → Customers → Customer Configuration.
- Customers outside the EU are invoiced without Danish VAT as exports.
The VAT zone must be set from the order: the customer's country and the VAT Magento actually charged. Do not use the zone on an old debtor card, because a customer can buy as a private person one day and as a business the next.
Credit memos, gift cards and several shops
- Credit Memos in Magento, full or partial, must become credit notes on the original invoice in e-conomic, with the same VAT and in the same currency.
- Gift cards used as payment are a payment, not a discount. The goods keep their full price and VAT, and the gift card is deducted as a line without VAT. Gift cards are built into Adobe Commerce; in Magento Open Source they come from an extension.
- Several websites or store views in one Magento: decide which belong to which set of books in e-conomic. If you have two companies, their orders must not end up in the same books.
Common mistakes
- Shipping without VAT, because "Tax Class for Shipping" is set to "None".
- Missing EU rates above the OSS threshold: the customer pays Danish VAT, but you owe the country's VAT.
- Rounding. Prices including VAT divided by 1.25 and rounded per line can leave differences of an øre or two. The invoice must hit the order's total exactly.
- A product group with the wrong VAT. A product sold without VAT in a product group with 25% gives an invoice that is too high.
- The payment booked as a sale. Once the order is invoiced, the payment from Klarna, Nets Easy or Stripe must close the invoice, not be booked as a new sale.
Questions about Magento 2 and e-conomic
When should a Magento order be invoiced?
Many invoice when the payment has gone through and the order is "Processing"; others only when it has shipped and is "Complete". Choose one rule and keep to it, so the same order is never invoiced twice and cancelled orders ("Canceled") never come along.
Must the product numbers in Magento exist in e-conomic?
It is the easiest. If the product has the same number (SKU) in both places, the sale lands on the product group and account the product belongs to. If the product is missing in e-conomic, it must be created in a product group with the right VAT before the invoice is booked.
Does it work with Magento 1?
Magento 1 is no longer supported by Adobe and gets no security updates. The guide is for Magento 2, and 2app connects Magento 2.4 or later (Open Source and Adobe Commerce).
Automatically with 2app
2app fetches the orders from Magento 2.4 or later and makes a draft invoice in e-conomic for each. A draft is the default; you can choose to have 2app also book the invoice and send it to the customer by email or EAN. The VAT zone is set per order from the customer's billing country and the VAT the shop charged, including OSS zones, which 2app suggests from your e-conomic. If the shop charged another country's VAT, for instance because the goods were delivered to a different country than the billing country, the order stops with the reason. The total is checked against what the customer paid, to the øre, and an order that does not match stops in the same way instead of becoming a wrong invoice.
Credit Memos become credit notes in the same VAT zone as the original invoice, and Magento's "Adjustment Refund" and "Adjustment Fee" become lines without VAT on a product number you choose. Adobe Commerce gift cards become a line without VAT on a product number you choose; gift cards from Magento Open Source extensions are not read. One connection reads one store (Store ID). If you have two companies in the same Magento, each company connects its own store to its own e-conomic.
The payments can then close the invoices with Klarna to e-conomic, Nets Easy to e-conomic or Stripe to e-conomic.