DHL Shipping (Beta)

Create DHL Paket labels, return labels and tracking from your Magento orders, with post office and parcel shop delivery at checkout, through your own DHL business customer account.

  • Magento 2.4.7 – 2.4.9
  • PHP 8.2 – 8.5
  • Version 1.0.2
$99

One-off payment, with 12 months of updates.

What is included

  • 12 months of new versions and fixes; the versions released in that time stay yours
  • Install with Composer, or download a zip from your account
  • Licence for one production domain, staging and development copies included
  • 30-day money-back guarantee, refund policy

No subscription or automatic renewal. Keep using the versions included in your update period. Update and licence details

Key features

  • DHL Paket labels from the order view and the order grid
  • PDF or ZPL2 labels in four print formats
  • Post office and parcel shop search at checkout
See all features

Composer package softaware/module-shipping-dhl

  • Labels without copy and paste

    Create the DHL label and the Magento shipment in one step. The tracking number goes on the shipment and into the shipment e-mail.

  • Pickup at checkout

    Customers search DHL post offices and parcel shops by postcode or town and choose one on a map before they pay.

  • Status you can see

    Tracking runs by cron, stores every event and the delivery date, and can set the order status or e-mail the customer.

All features

What is included

Labels

  • DHL Paket, Kleinpaket, Paket International, Europaket and Warenpost International
  • PDF (910-300-700, 910-300-410, 910-300-300 or A4) or ZPL2
  • Single orders or up to 50 orders at a time from the order grid
  • One merged PDF for printing
  • Cash on delivery and additional insurance

Checkout

  • Home delivery and pickup point methods
  • DHL post offices and parcel shops (Location Finder)
  • Built-in map and list, no Google key
  • Flat, weight table or subtotal table prices
  • Free shipping from a subtotal, allowed countries

After the label

  • Automatic tracking by cron, events and delivery date
  • Optional order status and customer e-mails on milestones
  • Return labels with a signed customer download link
  • Cancel labels through the DHL API
  • Works with Softaware Returns

Admin and setup

  • Sandbox mode with DHL's public test user
  • Test Connection without creating a label
  • Credentials stored encrypted
  • API log with secrets masked
  • Separate ACL permissions and CLI commands

Feature tour

Everything your shoppers and your team see

01 / 05

Labels, tracking and returns on the order

The Shipping Connect block on the order lists every DHL label with its tracking number and status. Update tracking, create a return label or cancel a label from here.

02 / 05

Your DHL account in one form

API key from developer.dhl.com, business customer portal login and EKP. A sandbox switch with DHL's public test user, and Test Connection checks the login without creating a label.

03 / 05

DHL methods with your own prices

Home delivery or pickup point, DHL product, flat price or a weight or subtotal table, free shipping from a subtotal and allowed countries per method.

04 / 05

Every DHL event, stored

The label page shows the status, the delivery date and all tracking events from DHL's Shipment Tracking API, with Download Label and Update Tracking buttons.

05 / 05

All labels in one grid

Status, last event, delivery date and mode for every outgoing and return label. Print a selection as one PDF, update tracking or cancel labels in bulk.

Live demo

Try it before you install it

A full Magento store with the module installed, on Luma and on Hyvä. The admin demo signs you in with one click.

Compatibility

Requirements and compatibility

Compatibility of DHL Shipping (Beta)
Magento2.4.7 – 2.4.9
PHP8.2 – 8.5
Latest version 1.0.2
composer.json requires php ~8.2.0||~8.3.0||~8.4.0||~8.5.0 magento/framework ~103.0.7 softaware/module-shipping-core ^1.1

Installation

Up and running in minutes

After you buy, create a Composer key in your account. Then, in the root of your Magento project:

  1. 01Add the repository and your key (once per project)

    composer config repositories.softaware composer https://repo.softawarecommerce.com
    composer config --auth http-basic.repo.softawarecommerce.com PUBLIC_KEY PRIVATE_KEY
  2. 02Install the module

    composer require softaware/module-shipping-dhl
  3. 03Enable it

    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento setup:static-content:deploy
    bin/magento cache:flush

    The last three are only needed in production mode.

Prefer a zip? Every version you are entitled to can be downloaded from My modules. More about Composer access

User guide

How to set up and use DHL Shipping (Beta)

For version 1.0.2. The same guide comes with the module, in docs/user-guide.md.

Ship your Magento orders with DHL Paket (Germany): labels and the Magento shipment in one step, DHL post offices and parcel shops at checkout, automatic tracking with delivery dates, return labels and cancelling, all through your own DHL business customer account. The package is a carrier for Softaware Shipping Connect and uses the shared Shipping Core for the checkout, label and tracking screens.

Shipping Connect block on the order view with a DHL label and a return label
Shipping Connect block on the order view with a DHL label and a return label

Status: Beta. The Location Finder (pickup point search) is tested live against the DHL sandbox. Labels, returns, cancelling and tracking are built from the developer.dhl.com documentation and tested with recorded responses. Create sandbox labels with your own account and check them before you go live.

1. Requirements

MagentoOpen Source or Adobe Commerce 2.4.7 to 2.4.9
PHP8.2 to 8.5
ThemesCheckout: Luma checkout (Hyvä shops use it through Hyva_LumaCheckout); customer order view on Luma and Hyvä
Othersoftaware/module-shipping-core 1.1 or later (free, installed automatically) and softaware/module-core
DHLDHL business customer account in Germany (EKP customer number and business customer portal login) and an app on developer.dhl.com

What you need from DHL

  1. Business customer account (DHL Geschäftskunde) with a 10-digit EKP customer number and a login to the DHL business customer portal. The billing number DHL expects is EKP + procedure + participation; the module builds it for each product from the EKP and the Participation (Teilnahme) value (default 01).
  2. developer.dhl.com app with access to Parcel DE Shipping, Parcel DE Returns, Shipment Tracking (Unified) and Location Finder (Unified). The app's API key is used for sandbox and live. For live labels DHL must approve the app for production.
  3. For return labels: the Returns Receiver ID from the DHL returns portal.
  4. For cash on delivery: the bank account that receives the money (IBAN, BIC, account holder).

The module cannot create labels without these credentials. For testing, the DHL sandbox accepts a public test user (user-valid), password and EKP 3333333333 from the DHL documentation together with your own API key; the connection form shows them as "Test system: ..." under the fields.

2. Installation

With Composer from the SoftAware repository. The Composer keys are in your account on softawarecommerce.com; see https://softawarecommerce.com/shop/composer-access/ for the setup.

composer config repositories.softaware composer https://repo.softawarecommerce.com
composer config --auth http-basic.repo.softawarecommerce.com PUBLIC_KEY PRIVATE_KEY
composer require softaware/module-shipping-dhl
bin/magento setup:upgrade
bin/magento setup:di:compile            # production mode only
bin/magento setup:static-content:deploy # production mode only
bin/magento cache:flush

Composer also installs softaware/module-shipping-core and softaware/module-core. To update later run composer update softaware/module-shipping-dhl softaware/module-shipping-core and the same bin/magento commands.

3. Quick start

  1. Stores > Configuration > Softaware > Shipping Connect > General > Enabled = Yes (per store view).
  2. Softaware > Shipping Connect > Carrier Connections > Add Carrier Connection, choose DHL Paket (Germany).
  3. Enter the name, the credentials and the EKP (section 4), leave Sandbox / Test Mode on for the first tests.
  4. Click Test Connection. It sends a validation request with your sender address and reports "DHL accepted the credentials and billing number"; no label is created and nothing is saved.
  5. Add at least one checkout method, fill in the sender address, set Enabled = Yes and save.
  6. Place a test order with the DHL method, open it in the admin and click Create Shipment and Label.

4. The DHL connection

Softaware > Shipping Connect > Carrier Connections > edit the DHL connection. Several DHL connections are fine, for example one per website or a sandbox and a live one.

DHL connection: general settings and credentials
DHL connection: general settings and credentials

General

  • Name: for you (admin and labels list). Customers see the checkout title.
  • Enabled: only enabled connections offer checkout methods and are called for labels, return labels, pickup point searches, tracking and cancelling. With Shipping Core 1.1.2 or later, "Update Tracking" and "Cancel" on a disabled connection tell you to enable it first, and the cron skips its parcels without calling DHL.
  • Sandbox / Test Mode: on uses DHL's sandbox (labels are not valid for shipping); off uses your live portal user.
  • Website: where the checkout methods are offered and which orders may use the connection.
  • Carrier Title at Checkout: shown above the methods at checkout and in the tracking pop-up (empty = carrier name).

Credentials

  • API Key: from your developer.dhl.com app.
  • Business Customer Portal User and Portal Password: your DHL business customer portal login.

Secrets are stored encrypted and never shown again; leave ****** to keep a saved value.

Carrier Settings

  • EKP (10-Digit Customer Number) and Participation (Teilnahme).
  • Label Print Format: 910-300-700 (103 x 199 mm, default), 910-300-410 (103 x 150 mm), 910-300-300 (A5) or A4.
  • Returns Receiver ID: from the DHL returns portal (sandbox value deu).
  • COD IBAN, COD BIC, COD Account Holder: needed only for cash on delivery.
  • Default Carrier Product, Label Format (PDF or ZPL2; ZPL2 labels use 910-300-410) and Pickup Point Selector (the built-in map and list).

Checkout Methods

DHL checkout methods
DHL checkout methods

Each row is a shipping method at checkout:

  • Title, Delivery (Home delivery or Pickup point / locker) and Carrier Product (DHL Paket, DHL Kleinpaket, DHL Paket International, DHL Europaket, Warenpost International; pickup point delivery uses DHL Paket).
  • Price: flat, by weight or by subtotal with a price table such as 2:4.95, 5:6.95, 31.5:9.95 (above the last limit the method is not offered). DHL gives no price quotes through this API, so live prices are not available.
  • Free From Subtotal, Countries (ISO codes) (empty = all) and Sort.

Cart rules with free shipping make every method free.

Sender Address and Parcel Defaults

The sender address goes on every label (or Use Address of Inventory Source for MSI shops). If it is empty, the store information from Stores > Configuration > General is used. Parcel Defaults (weight in kg, length, width and height in cm) fill the label form when an order has no weights.

5. Pickup points at checkout

For a method with Delivery = Pickup point / locker, customers see Choose pickup point under the shipping methods, search by postcode or town and choose a DHL post office or parcel shop from a list (distance, type and opening hours) next to an OpenStreetMap map. The point is required before the payment step and again when the order is placed. It is stored with the order and shown in the admin order view, the customer's order view, order e-mails and PDFs.

Packstation lockers are not offered: DHL needs the customer's DHL Postnummer for them, which the checkout does not collect. DHL needs the customer's e-mail address for post office and parcel shop delivery.

Settings in Stores > Configuration > Softaware > Shipping Connect > Pickup Points at Checkout: Add Pickup Point to Shipping Description, Points Shown per Search, Searches per Minute per Visitor, Map Tile URL and Map Attribution.

6. Creating labels

  • One order: order view > Create Shipment and Label. Choose the connection, DHL product, weight and dimensions, the COD amount (pre-filled for cash on delivery payment methods) and an insured value, and whether the customer gets the shipment e-mail. The module creates the DHL label, the Magento shipment with the tracking number and stores the PDF on the shipment, so Magento's "Print Shipping Label" works too.
  • Several orders: Sales > Orders, select up to 50 orders > Create Shipments and Labels, then print them as one PDF. Print Shipping Connect Labels prints the labels of selected orders again.
  • One parcel per label: DHL numbers each parcel as a shipment of its own; create one shipment per parcel.

A lock per order and a pending record stop double labels when someone clicks twice.

7. Tracking

Label page with DHL tracking events
Label page with DHL tracking events

With Track Parcels Automatically on, a cron job asks DHL's Shipment Tracking API for open parcels every 15 minutes (each parcel every 1 to 24 hours depending on its age and status) and stops after delivery or after Stop Tracking After (Days). DHL's statuses map to Pending, In Transit, Out for Delivery, Delivered and Exception. The events, the status and the delivery date appear on the order, the label page and the labels list; customers see the status in their order view.

Settings (Stores > Configuration > Softaware > Shipping Connect > Tracking): Parcels per Cron Run, Stop Tracking After (Days), Order Status When Delivered, E-mail Customer When, Tracking E-mail Template and Tracking E-mail Sender. DHL's tracking API allows 250 calls per day by default: keep Parcels per Cron Run in line with your quota. Update Tracking on the order or label page, or the mass action Update Tracking Now, updates at once.

8. Return labels and cancelling

  • Return label: order view > Create Return Label. The label is created through DHL's Parcel DE Returns API (PDF) with the customer as sender, addressed to your Returns Receiver ID. The label page offers a signed download link for the customer (30 days). With Softaware Returns, the admin return page offers "Carrier return label (Shipping Connect)".
  • Cancel: Cancel on the order view or the label page, or Cancel Labels in the labels list. DHL accepts this before the shipment is manifested. The tracking numbers are removed from the Magento shipment.
Labels list with DHL labels
Labels list with DHL labels

9. Command line

bin/magento softaware:shipping:adapters                      # installed carriers and what they support
bin/magento softaware:shipping:test-connection [id]          # test credentials (all active connections)
bin/magento softaware:shipping:create-label <order> [-c connection] [-s product] [-p parcels] [-w kg] [--cod amount] [--return] [--no-email]
bin/magento softaware:shipping:track [--order number] [--label id] [--limit n]

DHL product codes for -s: V01PAK (DHL Paket), V62KP (Kleinpaket), V53WPAK (Paket International), V54EPAK (Europaket), V66WPI (Warenpost International).

10. Permissions (ACL)

System > Permissions > User Roles > Role Resources > Softaware > Shipping Connect: View Shipments and Labels, Create Shipments and Labels, Cancel Labels, Create Return Labels, Manage Carrier Connections, View API Log, Settings. Creating labels also creates the Magento shipment, so it needs Sales > Operations > Orders > Actions > Ship as well.

11. Data sent to DHL

Recipient name, company, address, phone and e-mail, parcel weights and dimensions, order number, the chosen pickup point and, for cash on delivery, your bank details. Requests and responses are logged in Softaware > Shipping Connect > API Log with keys and passwords masked and label files left out (Log Requests: all, errors only or off).

12. Troubleshooting

  • Test Connection fails with a login error: check the API key, portal user and password, and that the sandbox switch matches the credentials (sandbox user with sandbox on, live user with sandbox off).
  • "DHL rejected the shipment: ...": DHL's validation message follows, for example about an address field DHL could not accept. Fix the address on the order and try again.
  • "EKP" (or "COD: IBAN") is not set in the carrier connection: fill the field under Carrier Settings.
  • No DHL methods at checkout: Shipping Connect enabled for the store view, connection enabled, the website and the countries of the method match, and the method's price table covers the cart weight.
  • Tracking stays empty: DHL often only knows the number once the parcel is handed over; check the API log and your tracking quota.

13. Uninstall

Disable or delete the DHL connections first, then:

composer remove softaware/module-shipping-dhl
bin/magento setup:upgrade

Labels already created stay in the labels list. Shipping Core and its tables stay until you remove softaware/module-shipping-core as well.

Changelog

Release notes

1.0.2

Latest
  • Product listing, FAQ and user guide (docs/)

1.0.1

  • Connection form: says where the API key and the business customer portal login come from and what the DHL sandbox uses; the sandbox user, password, EKP and returns receiver are shown as "Test system: ..." under their fields; field labels in title case.
  • Requires Shipping Core 1.1 (CredentialsHelpInterface).

1.0.0

  • DHL Paket Germany adapter for Softaware Shipping Connect (moved from the former single module softaware/module-shipping-connect 1.0.0; adapter codes unchanged, so existing connections keep working).

FAQ

Questions, answered

Something else on your mind? The developers who wrote the module answer before and after you buy.

Ask a question →

Already installed it? Open a support ticket

What do I need from DHL?

A DHL business customer account in Germany (Geschäftskunde) with an EKP customer number and a login to the DHL business customer portal, plus an app on developer.dhl.com that has access to Parcel DE Shipping, Parcel DE Returns, Shipment Tracking (Unified) and Location Finder (Unified). The app gives you the API key. For live labels DHL has to approve the app for production. Without these credentials the module cannot create labels.

Can I try it before I have a live account?

Yes. Switch on Sandbox / Test Mode in the connection. DHL's sandbox uses a public test user and EKP from the DHL documentation (the form shows them under the fields) together with your own developer.dhl.com API key. Sandbox labels are not valid for shipping.

Which DHL products can I ship with?

DHL Paket, DHL Kleinpaket, DHL Paket International, DHL Europaket and Warenpost International. You choose the product per checkout method, as the connection default, or per order when you create the label.

Do my customers get pickup points at checkout?

Yes, DHL post offices (Postfilialen) and parcel shops. Customers search by postcode or town and choose a point in a list next to a map before the payment step. The point is stored with the order and printed on the label request. DHL needs the customer's e-mail address for this kind of delivery, which Magento always has.

What about Packstation lockers?

Not supported. DHL needs the customer's DHL Postnummer for Packstation delivery, and the checkout does not ask for it, so the search only shows post offices and parcel shops.

Are shipping prices calculated live by DHL?

No. DHL's shipping API used here has no price quotes, so you set the prices of your DHL checkout methods yourself: a flat price, a weight table or a subtotal table, with optional free shipping from a subtotal. Magento cart rules with free shipping work as usual.

Which label formats are available?

PDF in the print formats 910-300-700 (103 x 199 mm), 910-300-410 (103 x 150 mm), 910-300-300 (A5) or A4, or ZPL2 for thermal printers. Labels from several orders can be printed as one PDF.

How does tracking work?

A cron job asks DHL's Shipment Tracking API for open parcels, more often for new parcels and parcels out for delivery, and stops after delivery. Events, the status and the delivery date are stored and shown on the order and the label page. Optionally the order status changes on delivery and customers get e-mails at the statuses you choose. DHL's tracking API allows 250 calls per day by default, so keep Parcels per Cron Run in line with your quota.

Can I create return labels?

Yes, from the order view (Create Return Label) through DHL's Parcel DE Returns API. You need the returns receiver ID from the DHL returns portal. The label page offers a signed download link you can send to the customer. With Softaware Returns installed, the admin return page offers "Carrier return label (Shipping Connect)", which creates the DHL return label with the return number as reference.

Can I cancel a label?

Yes, from the order view, the label page or in bulk in the labels list, as long as DHL still accepts the cancellation (before the shipment is manifested). The tracking numbers are removed from the Magento shipment.

Does it support cash on delivery and insurance?

Yes. Enter the bank account for cash on delivery (IBAN, BIC, account holder) in the connection. The COD amount is filled in for the payment methods you mark as cash on delivery, and you can add an insured value per label.

Can one label hold several parcels?

No. DHL numbers every parcel as a shipment of its own, so the module creates one label per parcel: use one parcel per label, or create a shipment per parcel.

Is the DHL integration finished and tested?

It is marked Beta. The Location Finder (pickup point search) is tested live against the DHL sandbox; labels, returns, cancelling and tracking are built from DHL's API documentation and tested with recorded responses. Create a few sandbox labels with your own account before you go live.

What else do I need to install?

Softaware Shipping Core (softaware/module-shipping-core), the free shared base of all Shipping Connect carriers. It installs automatically with Composer and provides the checkout methods, the label screens, tracking and the API log.

Support

Help from the developers who wrote it