Install PeppolKit in Magento 2
This is how you install the PeppolKit module in Magento 2 or Mage-OS and connect your shop. After that every paid order gets an invoice and every Magento credit memo becomes a PeppolKit credit note.
What you need
- Magento Open Source 2.4.7, 2.4.8 or 2.4.9, or Mage-OS. Tested on all three with PHP 8.3.
- Access to the server (SSH) to place the module, and a working Magento cron. The module queues paid orders; cron sends them every minute.
- A business established in the Netherlands or Belgium, with your VAT number and your KvK or enterprise number.
Install
- Download the zip at peppolkit.com/downloads/peppolkit-magento.zip. The module has been submitted to the Adobe Commerce Marketplace and is not listed there yet.
- Unpack it in the folder app/code/Kadeworks/PeppolKit of your Magento installation. The file registration.php then sits directly in that folder.
- Enable the module. Run in the Magento root:
If your shop runs in production mode, also run:bin/magento module:enable Kadeworks_PeppolKit bin/magento setup:upgrade bin/magento cache:flushbin/magento setup:di:compile bin/magento setup:static-content:deploy
Connect and set up
- Connect your shop. In the Magento admin go to Sales → PeppolKit. Check Your e-mail address and click Connect PeppolKit. The account is free up to 20 invoices a month and asks for no payment details. You see "PeppolKit is connected. Fill in your company details below." and the status Connected.
- Fill in your company details under Company details on your invoices: company name, street and number, postcode, city, country (the Netherlands or Belgium), VAT number and KvK or enterprise number. IBAN, reply-to address and invoice number prefix are optional.
- Choose your options: E-mail the invoice to the customer, Send invoices to business customers over Peppol, OSS and the €10,000 threshold, plus the Invoice language. Click Save. You see "Saved. Paid orders now get an invoice automatically."
If Magento also e-mails its own invoice, your customer gets two. Switch that e-mail off under Stores → Configuration → Sales → Sales Emails → Invoice.
One Magento installation has one connection: all store views invoice from the same company. PeppolKit knows your shop by the address of the default store view.
When is an invoice or credit note made?
- Invoice: as soon as an order is fully paid in Magento: everything that can be invoiced is invoiced, and every Magento invoice is paid. With a payment method that captures at once that is right after the order; with bank transfer it is when you create the Magento invoice. The PeppolKit invoice follows within a minute or two.
- Amounts: the invoice shows what your customer paid: the items, discounts, shipping and the VAT Magento charged, to the cent. It works with catalog prices including and excluding tax.
- Credit note: as soon as you create a credit memo in Magento for an order with a PeppolKit invoice. The credit note refers to the original invoice and goes to your customer the same way.
- On the order the admin shows the PeppolKit section with the invoice and credit notes, the PDF and UBL links, the Peppol status and the button Resend e-mail.
VAT numbers of business customers
PeppolKit reads the VAT number from the billing address of the order, or else from the customer account. Show the field under Stores → Configuration → Customers → Customer Configuration → Name and Address Options → Show VAT Number on Storefront. PeppolKit checks the number with VIES and applies reverse charge on the invoice for a valid number from another EU country. The amount your customer pays comes from Magento, though: also switch on automatic customer groups for EU business customers there (Create New Account Options → Enable Automatic Assignment to Customer Group), with a customer group without VAT. Otherwise PeppolKit warns on the order that VAT was charged.
Activate Peppol
On the PeppolKit page the Peppol section says how your shop sends, with a button to the dashboard. Belgian shop? Click Connect Peppol in the dashboard and confirm your company's identity once, in about 5 minutes; Peppol is then included in every plan. Dutch shop? Connect your own free Peppyrus account.
Earlier orders and your first test
The button Create invoices for paid orders of the last 60 days queues paid orders without an invoice, up to 250 at a time. They are handled like new ones: if e-mailing is on, customers get their invoice by e-mail.
Test by creating a Magento invoice on an order (Invoice → Submit Invoice). Within a few minutes the PeppolKit section of the order shows the invoice number. If it takes longer, click Create invoice now; if the invoice appears then, Magento's cron is not running.
Frequently asked questions
Does the module work with Mage-OS and Adobe Commerce?
With Mage-OS, yes: the module is tested there (versions equal to Magento 2.4.7, 2.4.8 and 2.4.9). Adobe Commerce shares the same parts, but it has not been tested there yet. Email support@peppolkit.com if you want to try it and we will help.
No invoice appears. What now?
Open the order in the admin: the PeppolKit section gives the reason. Usually the company details are not saved yet, the limit of your plan is reached, or Magento's cron is not running. With bin/magento peppolkit:send you send the queue by hand.
Does the module slow down my checkout?
No. The module only puts a paid order in a queue. Sending to PeppolKit happens afterwards through cron, outside the checkout.
How do I remove the module?
Disconnect first on the PeppolKit page. Then run bin/magento module:disable Kadeworks_PeppolKit, delete the folder app/code/Kadeworks/PeppolKit and run bin/magento setup:upgrade. Your invoices stay in your PeppolKit dashboard for 30 days.
PeppolKit by platform: Shopify, WooCommerce, PrestaShop, Magento, Drupal Commerce, OpenCart, Shopware, Joomla, bol.com, Lightspeed, CCV Shop, Wix and Stripe. See how it works for your webshop.
Leave Peppol to PeppolKit.
Install PeppolKit and your business customers get their invoice over Peppol, without you having to deal with the network.
Choose your platform Start free with 20 invoices a month.An explanation for orientation, not tax advice.