# dhl/module-carrier-paket-returns

> Carrier implementation for DHL Business Customer Shipping Returns

`composer require dhl/module-carrier-paket-returns`

Canonical URL: https://packagento.com/dhl/module-carrier-paket-returns

## At a glance

- **Vendor**: DHL (https://packagento.com/dhl.md)
- **Latest version**: 2.6.0 — released 2026-07-10
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/dhl/module-carrier-paket-returns and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require dhl/module-carrier-paket-returns:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Carrier implementation for DHL Business Customer Shipping Returns

## README

DHL Paket Returns Shipping Carrier Extension
============================================

The DHL Paket Returns extension for Magento® 2 integrates the _DHL Retoure API_
API into the order processing workflow.

Description
-----------
This extension enables merchants to request return labels for orders
via the [DHL Retoure API](https://entwickler.dhl.de/en/) (DHL Geschäftskundenversand-API).

Requirements
------------
* PHP >= 8.3
* PHP JSON extension

Compatibility
-------------
* Magento >= 2.4.8

Installation Instructions
-------------------------

Install sources:

    composer require dhl/module-carrier-paket-returns

Enable module:

    ./bin/magento module:enable Dhl_PaketReturns
    ./bin/magento setup:upgrade

Flush cache and compile:

    ./bin/magento cache:flush
    ./bin/magento setup:di:compile

Uninstallation
--------------
To unregister the carrier module from the application, run the following command:

    ./bin/magento module:uninstall --remove-data Dhl_PaketReturns
    composer update

This will automatically remove source files, clean up the database, update package dependencies.

Support
-------
In case of questions or problems, please have a look at the
[Support Portal (FAQ)](http://dhl.support.netresearch.de/) first.

If the issue cannot be resolved, you can contact the support team via the
[Support Portal](http://dhl.support.netresearch.de/) or by sending an email
to <dhl.support@netresearch.de>.

License
-------
[OSL - Open Software Licence 3.0](http://opensource.org/licenses/osl-3.0.php)

Copyright
---------
(c) 2023 DHL Paket GmbH

## Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### 2.6.0

Compatibility release for the netresearch shipping framework 5.0.0
(server-locked shipping option inputs). No functional changes.

### 2.5.0

Magento 2.4.9 compatibility release

#### Added

- Support for Magento 2.4.9
- Support for PHP 8.5

### 2.4.0

Magento 2.4.8 compatibility release

#### Added

- Support for Magento 2.4.8
- Support for PHP 8.4

#### Changed

- Modernized codebase with PHP 8+ features (nullable types, union types, `#[\Override]` attributes)
- Updated strict type declarations for PHP 8.3+ compatibility

#### Removed

- Support for PHP 8.2

### 2.3.0

Magento 2.4.7 compatibility release

#### Changed

- Switch from Zend_Measurement to Magento Framework Measurement
- Use escaper instead of block for escaping in templates

#### Removed

- Support for PHP 7.x
- Support for PHP 8.1

#### Changed

- Switch from _DHL Retoure API_ to _DHL Parcel DE Returns API_.

### 2.2.2

#### Changed

- Establish compatibility to `netresearch/module-shipping-core:2.9.0`.

#### Fixed

- Prevent broken styling in module configuration, reported via [#50](https://github.com/netresearch/dhl-shipping-m2/issues/50).

### 2.2.1

#### Fixed

- Do not persist empty QR labels from cross-border returns.

### 2.2.0

Magento 2.4.4 compatibility release

#### Added

- Support for Magento 2.4.4

#### Removed

- Support for PHP 7.1

### 2.1.0

#### Added

- Import DHL Business Customer Portal _Receiver IDs_ CSV file to module configuration.
- Configure carrier title.

#### Removed

- Remove obsolete config fields.

### 2.0.3

#### Changed

- Move returns feature to shipping core and ui modules.

### 2.0.2

#### Changed

- Print order number instead of billing number as customer reference on shipping labels.

### 2.0.1

#### Changed

- Use `netresearch/module-shipping-core` package for three-letter country code calculation.

#### Fixed

- Add missing sandbox _Receiver ID_ configuration for Italy.

### 2.0.0

#### Changed

- Replace shipping core package dependency.

### 1.1.1

#### Changed

- Update infobox text in module configuration.

### 1.1.0

Magento 2.4 compatibility release

#### Added

- Support for Magento 2.4

#### Removed

- Support for Magento 2.2

#### Changed

- Update sandbox _Receiver IDs_ according to developer portal listing.

#### Fixed

- Allow letters in _Participation Numbers_ configuration.

### 1.0.1

Bugfix release

#### Fixed

- Update _Receiver IDs_ configuration setting for sandbox access. 

### 1.0.0

Initial release

## Recent Versions

| Version | Released |
|---|---|
| 2.6.0 | 2026-07-10 |
| 2.5.0 | 2026-06-03 |
| 2.4.0 | 2025-07-02 |
| 2.3.0 | 2024-05-28 |
| 2.2.2 | 2023-04-11 |
| 2.2.1 | 2022-05-25 |
| 2.2.0 | 2022-04-29 |
| 2.1.0 | 2022-04-06 |
| 2.0.3 | 2021-10-28 |
| 2.0.2 | 2021-08-26 |

Showing 10 of 16 versions. Full release history on https://packagento.com/dhl/module-carrier-paket-returns.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| dhl/module-shipping-core | ^2.5.0 |
| dhl/sdk-api-parcel-de-returns | ^1.2.0 |
| ext-json | * |
| magento/framework | ^103.0.8 |
| magento/module-catalog-inventory | ^100.4.8 |
| magento/module-config | ^101.2.8 |
| magento/module-directory | ^100.4.8 |
| magento/module-media-storage | ^100.4.7 |
| magento/module-quote | ^101.2.8 |
| magento/module-sales | ^103.0.8 |
| magento/module-shipping | ^100.4.8 |
| magento/module-store | ^101.1.8 |
| netresearch/config-fields-m2 | ^1.3.0 |
| netresearch/module-shipping-core | ^5.0.0 |
| php | ~8.3.0\|\|~8.4.0\|\|~8.5.0 |

### Require (dev)

| Package | Constraint |
|---|---|
| phpunit/phpunit | ^10.5.0 |

### Suggest

| Package | Constraint |
|---|---|
| magento/module-rma | * |

## Quality

Latest release (2.6.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | not tested | 1 | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 19 | 19 warnings (ruleset: Magento2) |
| PHPMD | Warning | 4 | 4 rule violations (UnusedFormalParameter:2, ExcessiveParameterList:1, MissingImport:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 13 | 13 | – | – |
| 2.4.8 | – | 13 | 13 | – |
| 2.4.9 | – | – | 13 | 13 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | Error | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["dhl/module-carrier-paket-returns"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

DHL is a Magento 2 vendor on Packagento. See https://packagento.com/dhl.md for their full catalogue.

