1.Introduction
This is the manual for the integration between Magento and e-Boekhouden.
The integration is working for these versions of Magento: FAQ - Magento versions. The integration is a basic integration. Magento has many options in the standard version that the integration does not support. In particular, these are:
- Reading shipping addresses. We do have an option for this, but it needs to be programmed on the Magento webshop side.
- Reading payment costs. We do have an option for this, but it needs to be programmed on the Magento webshop side.
- Adding discounts excl. VAT. The integration does not support this.
- Adding credit amounts - adjustments - in credit invoices. The integration cannot process this because the VAT information is missing.
- In some situations, the VAT of free items cannot be determined correctly.
- In some situations, the VAT percentage does not come through correctly from the Magento webshop. This often happens with smaller amounts and/or large quantities. Magento webshops pass on amounts in 2 decimals, not 4. This causes rounding differences. These invoices will have to be entered manually in e-Boekhouden.
- We will supplement this list if we notice that more items are missing.
This integration does not replace the work of an accountant. It saves time because you no longer have to retype documents. The accountant is still needed for advice, expertise, and control.
Tip: Other customers using this integration found the tips in the FAQ for Magento and in the FAQ for e-Boekhouden.
Read more Introduction .... Read less Introduction ....Installing the integration starts with signing up for a trial period, via our integrations page. After registration, you will receive an email containing an installation URL and login details. With this installation URL, you start the installation of the integration.
The installation is complete when both connection dots are green, and the settings in the Configuration tab have been entered and saved.
There is a trial period of 30 days.
If you want to install another integration, you can do so in the same way. Make sure you are logged out of the integration dashboard and preferably start the new installation in an incognito browser.
At the end of the trial or subscription period, the integration will not be automatically renewed. You will receive an offer for a one-year subscription or renewal by email at the end of this period. You can confirm the renewal by using the payment link in that email. Do you want to terminate the integration in the meantime? Please send us an email with the request and the license key. We can only stop integrations for you as of the current date, not on a future date.
Are you switching to another web shop/accounting system and do you want to re-establish a connection? In this faq we explain how to do this.
We advise you to deactivate the OAuth keys of the integration in your Magento webshop when uninstalling the integration.
2.How the integration works
Invoices are retrieved from the Magento webshop once per hour. This integration processes Magento invoices, not Magento orders. The integration works for both Magento 1.9 and Magento 2.x webshops, starting from Magento 2.1. Therefore, we do not support Magento 2.0.
Read more How the integration works .... Read less How the integration works ....
At the start of processing an invoice, we perform a number of checks on the Magento invoice:
- It is checked whether the total of the Magento invoice is equal to the sum of the amounts in the invoice lines.
- If the invoice is an ICP invoice, the VAT number is checked.
- It is checked whether a corresponding VAT code exists in e-Boekhouden for the VAT in each line.
- It is checked whether the invoice has not already been processed.
Processing a Magento invoice to e-Boekhouden takes place in three steps:
- The integration first checks if the debtor is already present in the accounting system. If not, the integration creates the debtor in e-Boekhouden. For a new debtor, we must provide a Code field. This becomes the debtor number in e-Boekhouden. We use the same logic here as e-Boekhouden. Matching of debtors between Magento and e-Boekhouden is based on email address.
- Products With the invoices option, the integration uses the SKU in the invoice lines. If this product is not present in e-Boekhouden, e-Boekhouden will reject the invoice or post it to a random product. Unfortunately, the integration cannot create new products in e-Boekhouden.
- The e-Boekhouden transaction (mutation, invoice) is created and processed.
After the invoice has been forwarded and a success message from e-Boekhouden has been received, the invoice is marked as completed. The Magento invoice appears in the Report tab on the dashboard.
If e-Boekhouden returns an error while processing the invoice, the invoice appears in the Errors tab on the dashboard. Via the yellow button More info more information about the problem can be found. Via the red button Report problem can the invoice with all necessary information easily be submitted to us after you have tried to resolve the problem yourself. If the problem is solved, in some cases the invoices can be processed again with the blue Process button.
Data
Information about the data that is processed can be found in the section Day-to-day: To e-Boekhouden later in the manual.
3.Required: Magento keys - only Magento 1.x
This step is only necessary for Magento 1.x. If you have a Magento 2.x webshop, you can skip this chapter!
3.1 Install extension
Installing and configuring the extension for Magento 1.x consists of the following steps:
First, check if your Magento webshop environment allows the use of the REST API. This check consists of the following steps. We use www.jouwwebwinkel.nl as the URL of your webshop.
(i) Is the REST API accessible? You can test this with the url http://www.jouwwebwinkel.nl/api/rest/products. Do you see a 403 appear on your screen? Fine. But …
(ii) … do you see a 404-screen?
Then the URL is redirected to an error page. This could be a problem with the .htaccess file. The line RewriteRule ^api/rest api.php?type=rest [QSA,L] must be present in this file. If not, you need to add it.
The problem could also be caused by a setting in the Apache web server. See this link for more information: http://magento.stackexchange.com/questions/29936/rest-api-returns-404.
(iii) Does the username you used to create the OAUTH keys have admin rights? That is actually necessary, otherwise the data cannot be retrieved from the webshop.
(iv) Do you use php-fpm fastcgi in the hosting environment? In that case, the authorization keys may not be transmitted correctly. This link contains more information: http://www.magentogeek.com/magento-rest-api-solution-for-400-bad-request/. This applies, among other things, to webshops hosted at byte.nl - shared hosting. They have a good explanation to solve this.
(v) In all cases: Contact us if you can't figure it out. We sometimes see details in our log files that might help you resolve the problems.
1. Turn off caching in your webshop. You can do this via System > Cache Management. After installing the extension, you can turn caching back on.
2. Install extension. Unzip the file and install the files under your Magento root. You can see from the structure of the zip file where to place which files. No files will be overwritten.
3. Define the REST Role. You first define a so-called Role that can read the invoice details, including tax rates and payment methods, from your webshop. To do this, go to System > Web Services > REST Roles. To use the extension, you need to create a Role of type Administrator. You create this by clicking Add Admin Role. If you already have one, you can reuse that Role.
On the left side of the screen is a screen titled Role Information. Click on the sub-menu link Role API Resources. You will see the option REST API Calls to read invoices appear. Check all the boxes under this option and save the details.
You have now configured the integration to have the right to read the invoices, tax rates, and payment methods entities from Magento, but you have not yet specified which data it is allowed to retrieve per entity.
4. Assign the fields that can be read. Go to System > Web Services > REST Attributes. Open the User Type Admin. Here, you will see the option REST API Calls to read invoices appear again. Check all options again and save the details.
5. Link the administrator to the REST role. Finally, you need to assign the administrator to the REST role. Go to System > Permissions > Users. Click on the administrator of the webshop. Go to REST Role, the bottom option in the menu on the left. Assign the administrator of the webshop to the Administrator REST Role.
3.2 Magento consumerkey and consumersecret
The steps for creating a Magento consumer key and consumer secret are as follows:
1. Log in as admin to your Magento 1.x webshop.
2. Go to System > Web Services > REST OAuth Consumers.
3. Click Add new to create the Magento keys. The key and secret are already filled in. Enter the name for the connection and the callback URL yourself. The value of the callback URL must be: https://interface.cloudinvoice.company/api/v1/servlet/magento/callback.php
4. Enter your administrator password. Click Save. You will enter the key and secret from this screen in a later chapter in the Consumerkey and Consumersecret fields of the connection settings screen.
4.Required: Magento after version 2.1
Magento webshops up to and including version 2.4.3 should follow the steps below to establish a connection with the webshop. For Magento webshops from version 2.4.4 onwards, we recommend creating an integration as explained below, but without a callback. If you contact us afterwards, we will ensure that you can enter the client ID / client secret / access token and token secret to establish the connection with the Magento webshop.
Please note: This is a standard integration without customization options. This means that the integration does not support all extensions in the webshop. It can also be difficult to connect the webshop due to a specific hosting configuration, for example, because of a modified .htaccess file, complex redirects, or a firewall. If you encounter these problems, it is often necessary to engage a Magento expert.
Installing and configuring the extension for Magento 2.x consists of the following steps:
1. Configuration. There are two Magento tabs you need to fill in. For the first one, we come up with a recognizable name and enter the Callback URL (https://interface.cloudinvoice.company/api/v1/servlet/magento2/callback.php?cikey=YOURLICENSEKEY), the Identity link URL (https://interface.cloudinvoice.company/api/v1/view/cloudinvoice/authenticate.php), and your password. YOURLICENSEKEY must be replaced with the license key from the email. It is always smart to save in between (top right). After that, we move on to the second tab, API.
You are now going to assign the permissions: which data from the webshop is the integration allowed to use? The image explicitly indicates which resources you need to check. Then click SAVE in the top right.
2. Activating the extension. You are now going to activate the extension. First, click on ACTIVATE.
You must grant permission to do so using the ALLOW button in the top right of the next screen.
And now you finally understand why Magento 2 is called 'Magento 2': two windows open! On the first window (so outside your Magento store):
In this separate window, enter your webshop domain name and the connection key you received by email upon registration. If you then click the Consent to connect button, you will see the activation take place in the other screen (of your Magento store).
The extension is now fully activated. To be sure, you can check the status of your integration on the Integration screen within your Magento webshop. The status should now be ACTIVE.
You have now completed the preparations in your Magento 2.x store.
5.Required: e-Boekhouden codes
Registrations from March 14, 2025
To establish the integration with e-Boekhouden, you need an API token. You can find this API token via Administration > Connections > API > e-Boekhouden API > Next. We recommend entering a clear name and an end date one year in the future. Please note that after this end date, you will need to re-establish the connection with the integration.
Registrations before March 14, 2025
To establish the integration with e-Boekhouden.nl, special codes are required. These are:
- username
- Security code 1
- Security code 2
6.Installation
Installing the integration starts with signing up for a trial period, via our integrations page. After registering, you'll receive an email with an installation URL and login details. Use this installation URL to start the integration installation.
Activating the integration consists of three steps:
1. Establishing the connection with the Magento webshop. For Magento 2.x webshops, you have already done this in the previous step. For Magento 1.9 webshops, you need to fill in additional details here.
2. Establishing the connection with e-Boekhouden. This authorizes the integration to write transactions to your e-Boekhouden administration and read information.
3. Configuring additional data, such as the VAT settings. Please note: The integration uses the amounts from the webshop to calculate the VAT percentages. Ensure that rounding differences do not cause problems with the VAT percentages.
Authentication Magento webshop:
This step only needs to be performed for Magento 1.9 webshops. For Magento 2.x webshops, the authentication has already been done in the previous step. Authenticating the Magento 1.9 webshop is done as follows:
- First you fill in the admin URL of the webshop with the consumerkey and consumersecret from the previous step.
- Then you click the yellow Connect button to give the integration the correct authorization. Only after performing these two steps is a valid connection with the Magento webshop established. You can see this because the indicator will be green.
e-Boekhouden Authentication
The red dot and the red Connect button for e-Boekhouden on the Configuration screen indicate that the connection with e-Boekhouden is not yet valid. To activate the connection, click the red Connect button. You will then see a screen containing fields for a username and two security codes. Here, you enter the username and the two security codes you determined in the previous section.
For e-Boekhouden invoices, an invoice template must be provided. Unfortunately, the integration cannot retrieve the invoice templates in the e-Boekhouden administration. Therefore, the integration uses the name 'Invoice template' as default. If you want to use a different invoice template, you can enter the name of the template when clicking Edit.
When configuring the VAT rates and general ledger accounts, a link is created between the VAT rates in webshop and the VAT codes and revenue accounts in e-Boekhouden. You can always make changes by clicking the blue 'Edit' button and selecting an option from the drop-down menus.
Intra-Community (ICP) and international deliveries
The Intra-Community supplies / ICP option is intended for business-to-business deliveries within the EU. These sales are invoiced with 0% VAT. A VAT number from the customer is required. The International option applies to deliveries outside the EU. For these sales, the integration expects 0% VAT; otherwise, the sales cannot be processed. Separate VAT codes and general ledger accounts can be configured for both ICP and international deliveries.
OSS settings
If you are dealing with OSS - new regulations as of July 1, 2021 - it can be configured as follows.
If you use the NL VAT rates, the following remains applicable:
- in the column VAT Code the VAT code with the relevant percentage
- in the column revenue account a revenue account for the net revenue, the payment and shipping costs
- the VAT account column has no function in this case
If you calculate with VAT percentages of the country of delivery in the webshop, please fill in the following:
Per EU country, except NL
- in the column VAT code the VAT code VAT_OSS
- in the VAT account column, a Balance Sheet account for the VAT to be paid in the respective country
- in the column revenue account a revenue account for the net revenue, the payment and shipping costs
Only when using VAT code VAT_OSS, the entry will take place based on the configured VAT account in the Configuration. For other codes, the VAT account is determined in e-boekhouden based on the code.
Once the VAT settings have been configured and saved, you will always see the selected VAT rates. If you want to start over, you can use the grey 'Remove VAT settings' button. Your current settings will then be deleted and you can begin again.
You can create a link here between the payment methods in the webshop and a fixed debtor in your e-Boekhouden administration. Invoices with a payment method from the list will then always be posted to this debtor. In that case, no new debtors will be created.
Note: It is not possible to set fixed debtors for ICP invoices. For an ICP invoice, a valid VAT number must be transmitted. Therefore, a debtor will always be created in e-Boekhouden for an ICP invoice.
This option is only available when processing to Invoices.
7.Day-to-day: From Magento
In this section, we show how we retrieve the invoices from Magento
Once an invoice has been processed, it cannot be processed again. An invoice that is modified in the webshop after it has been processed will not be adjusted in e-Boekhouden.
VAT numbers For business orders within the EU, outside the Netherlands, a VAT number is mandatory. The integration checks for this and also verifies that the VAT number is a valid VAT number.
VAT calculation: The integration always uses the prices in the [base_] fields, such as [base_grand_total] and [base_row_total].
The VAT amount in the invoice lines is determined as follows:
VAT amount = ['base_row_total_incl_tax'] - ['base_row_total']
The VAT percentage is determined as follows:
VAT amount/ ['base_row_total']
If the amount excl. VAT is 0, the VAT percentage defaults to 21%. Unfortunately, this cannot be adjusted.
Based on the VAT percentage, the VAT code and the general ledger account in e-Boekhouden are determined. We notice that some Magento webshops make their own corrections to the VAT in their invoices. The VAT then does not exactly match the VAT of the products. This results in incorrect VAT percentages, such as 8% instead of 9% and 22% instead of 21%. The integration cannot correct this and will give an error message if 8% and 22% do not appear in the webshop's VAT settings. We generally see this problem occur when using small amounts. Unfortunately, the integration does not have an adequate solution for this.
Field-level specification invoices
| Below is a specification at the field level for retrieving invoices from Magento 2.x webshops. | |
| Name field | Values from Magento order |
| Factor for multiplying amounts | In the Magento credit invoices, the amounts are listed as positive amounts. This is because debit invoices and credit invoices are separate entities. In Magento, you therefore have two types of invoices, debit and credit, and both types have a positive amount. Therefore, the integration uses a factor = 1 for debit invoices and a factor = -1 for credit invoices. |
| Invoice-identifier | [entity_id] Please note, to keep those IDs unique between debit and credit invoices, the integration places a 1 before the invoice ID of the credit invoice. This is why you see a multiplication by the factor. |
| Invoice number | [increment_id] from the Magento invoice |
| Orderid | [order_id] |
| Order number | [increment_id] from the Magento order. If it is configured for the merchant that the order number is leading, then for the order number a C_ is placed. |
| Affiliate number |
Is determined based on the underlying order
|
| Order-identifier | This is determined based on the URL in the field [order] |
| Invoice date | [created_at] |
| ICP indication |
An invoice is an ICP invoice if:
|
| International indication |
An invoice is an international invoice if:
|
| Payment method |
The payment method is determined as follows based on the field [paymethod]:
|
| Paymentmethod-id | [paymethod_id] |
| Total amounts incl or excl VAT | The amounts in the order can be incl. or excl. VAT. This is determined by the field [taxes_included]. This value is important for determining the Total incl and the Total excl, see below. |
| Total incl | [base_grand_total]. The base_ part ensures that the amount is taken in the webshop's base currency. |
| Total VAT | [base_tax_amount] |
| Total excl | Total incl VAT - Total VAT |
| Shopping cart values | These values are read via [base_subtotal] and [base_subtotal_inc_tax] |
| Name field | Values from Magento order |
| Name product | [name], special characters are removed as much as possible |
| Amount | [qty] |
| Amount incl VAT | [base_row_total_incl_tax]; for the unit amount we divide by the quantity |
| Amount excl VAT | [base_row_total]; for the unit amount we divide by the quantity |
| VAT Amount with discount | [base_row_total_incl_tax] - [base_row_total]; for the unit amount we divide by the quantity |
| VAT percentage |
The VAT percentage is tricky with Magento invoices because the Magento API provides these prices in 2 decimals, which quickly results in a percentage of 20%, 22%, 8% or 10% for small amounts. There is a workaround, but that requires programming work on the side of the Magento webshop.
|
| Discount | [base_discount_amount] for the discount amount incl VAT. For the discount excl VAT [base_discount_amount] - [base_discount_tax_compensation_amount]. |
| Line prices incl and excl discount | These are calculated from the discount and the unit prices. The unit prices are multiplied by the quantity. |
| The shipping costs are added as a separate invoice line | The amounts are determined based on [total_shipping], [shipping_tax_percentage] and [invoice_row_taxes_included] as in other lines. This line is only added for an amount other than 0. |
| The payment costs are added as a separate invoice line | The amounts are determined based on [paymethod_costs], [extra_payment_option_price] and [invoice_row_taxes_included] as in other lines. This line is only added for an amount other than 0. |
| The surcharges are added as separate lines to the invoice | The amounts are determined based on [extra_costs], [credit_point_discount], [invoice_row_taxes_included] as in other lines. The amount is only added for an amount other than 0. This leads to a maximum of 2 extra lines. |
| Accounts and VAT codes from e-Boekhouden | These are determined based on the settings in the integration, the delivery country of the invoice and the VAT percentages. The type for invoice lines is turnover / revenue, for the shipping costs line shipping / shipping costs and payment costs payment / payment costs. |
8.Day-to-day: To e-Boekhouden
Creating invoices / sales transactions
The invoices from Magento are imported into e-Boekhouden as mutations or invoices. For each invoice, the VAT and ledger account are provided as configured during the installation of the integration.
When creating an OSS invoice or mutation in e-Boekhouden, for each line in the Magento invoice two lines appear in the e-Boekhouden mutation / invoice. The first line in the e-Boekhouden mutation / invoice contains the amount excl VAT and the second line the VAT amount. The first line is posted to a revenue account, the second line to a VAT account. The revenue and VAT accounts can be configured via the Configuration tab of the dashboard.
When creating invoices or mutations, descriptions and invoice numbers can be adjusted. Below are the options for creating invoices and mutations in e-Boekhouden. When creating invoices, new debtors may be added to e-Boekhouden.
Please note: When creating mutations, the integration provides a sales number. If a mutation with that number already exists, the existing mutation will be overwritten. Therefore, always ensure that sales numbers are unique, especially if you have multiple integrations feeding into a single e-Boekhouden account.
If your integration was installed after March 14, 2025, and the integration processes to Invoices, these are invoices without a corresponding mutation. We can change this to Invoices with a corresponding mutation. In that case, the invoice can no longer be modified in e-Boekhouden.
Creating new debtors
When creating a mutation or invoice in e-Boekhouden, the code of the relation in e-Boekhouden is used. The integration first checks if the debtor is already present in e-Boekhouden. If so, the integration will use the relation code of this existing e-Boekhouden debtor. If not, the integration creates the debtor in e-Boekhouden.
The integration creates a RelationCode for the new e-Boekhouden debtor. The procedure is the same as if you were to create the mutation or invoice in e-Boekhouden yourself. The method performed by the integration is:
1. Determine the company name and the name of the debtor. For the debtor's name, the first name is appended to the last name.
2. Determine whether the company name or personal name of the debtor is used as the base name. If the company name is present, this becomes the base name. Otherwise, the first plus last name.
3. Take at most the first 10 characters of the base name
4. Determine if the base name occurs more than once in e-Boekhouden. If so, it will have one or more sequence numbers. Determine the first available sequence number and append this to the base name.
Example: If the company name is empty and the name is Klaartje Pietersen, the base name becomes KlaartjePietersen. We take the first 10 characters of this. This results in KlaartjePi. If this already occurs 5 times and the highest is KlaartjePi4, the debtor code becomes KlaartjePi5.
Matching between and e-Boekhouden for debtors is based on the email address.
Please note: The integration will never modify debtors in e-Boekhouden. The email address field is used for matching debtors. For integrations started before October 28, 2023, that process to e-Boekhouden mutations, we provide the debtor data within the mutation, and e-Boekhouden determines the debtor code itself.
Create products
Unfortunately, the integration cannot create new products in e-Boekhouden through the e-Boekhouden connection possibilities.
Specification field level creating e-Boekhouden
| Name | Example | Note |
| Invoice number | 3908 | This is optional; we recommend letting e-Boekhouden determine the invoice numbers itself. Then they are guaranteed to be unique and sequential. If you still want to provide the invoice number, the Magento invoice number or order number can be used for this. |
| Relation code | 2023031416200123 | The RelationCode of the debtor in e-Boekhouden. It is possible that the debtor was added to e-Boekhouden by the integration in a previous step. |
| Date | 2023-01-11 | Order date |
| Payment term | 14 | A default payment term can be set for invoices |
| Accounting mutation description | ORD145 - mollie | Order number - payment method (if present) |
| DirectDebit | false | Cannot be adjusted |
| Invoice template | Invoice template | The name of the invoice profile, default Invoice template. If you cannot set the invoice profile in the Configuration tab, you can provide the name to us, and we will set it. |
| Products | The article codes of the products in e-Boekhouden. It is possible that the integration created products in e-Boekhouden for this in a previous step. | |
| PostInAccounting | true | Cannot be adjusted |
| Lines | ||
| Amount | 1 | |
| Code | 6940478067395 | Product code in e-Boekhouden |
| Description | 2-week extension | The description in the line |
| PricePerUnit | 8.22 | Unit price excl. VAT |
| VATCode | HIGH_SALES_21 | As configured via the dashboard |
| OffsetAccountCode | 8000 | As configured via the dashboard |
| CostCenterID | 0 | This is never provided |
| Name | Example | Note |
| TYPE | 2 | Invoice payment received, this cannot be adjusted. |
| ACCOUNT | 1300 |
Usually 1300, but can be adjusted on request. Account configured for the payment method - this is a financial account in e-Boekhouden. |
| DESCRIPTION | ORD235 | Payment payment method - sales number in payment. |
| INVOICE | ORD235 | sales number in payment |
| PAYMENT REFERENCE | ORD235 | invoice number or order number |
| DATE | 01-01-2023 | |
| INEX | EX | |
| RelationCode | Debtor from the Open Items list at the sales mutation | |
| Lines | ||
| AMOUNTEXCL | 99.09 | Amount ex VAT |
| AMOUNTINCL | 119.90 | Amount incl. VAT |
| VATAMOUNT | 20.81 | VAT amount |
| VATPERC | HIGH_SALES_21 | As set on the dashboard |
| OFFSET ACCOUNT | 8000 | As set on the dashboard |
9.Support
Read more Support .... Read less Support ....
Explanation tabs dashboard
On the Dashboard >> Report you can see which invoices from your Magento webshop, and when, have been transferred to e-Boekhouden.What if invoices are missing in e-Boekhouden
If invoices are missing in e-Boekhouden we recommend following the steps below:- Log in to the dashboard: https://uwkoppeling.webwinkelfacturen.nl. The username and password are included in the registration email.
- Go to the Errors tab and check if invoice is there. You may need to adjust the search period if the
invoice is from a previous month. If you find invoice in this overview:
- Check the error code and verify whether you can resolve it yourself.
- If yes resolve the issue and click the blue Process button to resubmit the invoice.
- If not use the red Report problem button to create a ticket with us.
- Note if there are multiple errors, please create only 1 or 2 tickets. We will automatically see the other issues.
- Go to the Report tab and see if invoice is listed there. If so, you'll often see an identifier for e-Boekhouden (in the purple section of the overview) that you can use to search for invoice.
- Go to the Open tab and check if invoice is there.
- If you cannot resolve the issue, you can always create a ticket via the green Ask us button.