Magento 2 extension for implementing the EU right of withdrawal via button click.
The EU Directive (EU) 2023/2673 requires that in the future, consumers must be able to withdraw from online purchase contracts just as easily as they were concluded. Starting June 19, 2026, a clearly visible withdrawal button will be mandatory in online shops.
This Magento module provides exactly that: your customers can withdraw orders with just a few clicks – directly from their customer account or via a separate form for guest orders. As a shop operator, you maintain a full overview in the admin area.
Withdrawal button in the order overview
In the My Account > My Orders view, a new column appears for each order. There, the customer can see at a glance:
- A Withdrawal link, as long as the period is active
- The note "Withdrawal submitted", if a withdrawal has already been made
- The note "Period expired", if the withdrawal period has passed
Additionally, a "Withdrawal Order" button is displayed on the order details page.
Withdrawal detail page
Refore the actual withdrawal, the customer sees a summary of their order:
- Order number, date, status, total amount
- All ordered items with name, SKU, quantity, and price
- The deadline until which withdrawal is possible, calculated from the date of the last shipment
- A button for final submission ₓ with a preceding security confirmation
Guest orders
Customers who ordered without an account can access the withdrawal via a dedicated search form. Entering the order number and email address is sufficient to find the order and initiate the withdrawal.
Accessible at: /withdrawal/guest/search
Confirmation page
After submission, the customer is redirected to a success page. This confirms that the withdrawal has been received and that an email is on its way.
Admin overview of all withdrawals
Under Sales > Withdrawals, you will find a tabular overview of all received withdrawals:
- ID, order number, customer name, email
- Status (Pending / Confirmed / Rejected)
- Date of order and date of withdrawal
- Direct link to the respective order view
All columns can be filtered and sorted.
Automatic email notification
Soon as a withdrawal is received, two emails are sent:
- To the customer ₓ Confirmation with order details
- To you – Notification with all relevant data
In addition, you receive a BCC copy of the customer email. The email templates can be customized in the admin panel.
Note in the order
Every withdrawal is automatically added as a comment in the order history. This way, it is immediately apparent in the order view that a withdrawal exists.
Configurable
In the admin under Stores > Configuration > Sales > Withdrawal Settings:
- Enable/Disable the module
- Set recipient address for notifications
- Set withdrawal period in days, counted from the last shipment date (Default: 14)
- Select email sender and templates
If you are using the Hyvä Theme, please install the Hyvä compatibility module:
https://github.com/Zwernemann/magento2-withdrawl-hyva
This module adds the required Hyvä frontend integration for the withdrawal button and ensures compatibility with the Hyvä template system.
The base module remains required.
Withdrawal entries can also be retrieved programmatically:
GET /rest/V1/zwernemann/withdrawals`
Access is protected by ACL permission (Zwernemann_Withdrawal::withdrawals).
Completely translated into German and English (97 strings). Further languages can be added via custom CSV files.
| Component | Version |
|---|---|
| Magento 2 Open Source | 2.4.6 to 2.4.8-p1 |
| PHP | 7.4 or higher |
Are you using a different Magento version? Let us know – we are happy to test it.
-
Extract the ZIP file and copy the entire contents to:
app/code/Zwernemann/Withdrawal/ -
Ensure the structure looks like this:
app/code/Zwernemann/Withdrawal/
Api/
Block/
Controller/
Helper/
Model/
Ui/
etc/
i18n/
view/
composer.json
registration.php
-
Run the following commands in the Magento root:
php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy de_DE en_US php bin/magento cache:flush -
Check if the module is active:
php bin/magento module:status zwernemann_Withdrawal
composer requirezwernemann/module-withdrawal
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy de_DE en_US
php bin/magento cache:flush
- Log into Magento Admin
- Navigate to Stores > Configuration > Sales > Withdrawal Settings
- Set "Enable Module to Yes
- Enter Notification Email ₓ withdrawal notifications will be sent here
- Adjust Withdrawal Period if the legal period differs
- Configure email sender and templates if necessary
- Save and flush cache
The search form for guest orders is located at:
https://www.your-shop.com/withdrawal/guest/search
Include this link, for example:
- In the footer of your shop
- In order confirmation emails
- On your withdrawal policy page
With Magento URL rewrites, you can adjust the address as desired, for example to /withdrawal.
php bin/magento module:disable Zwernemann_Withdrawal
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flushThen delete the directory app/code/Zwernemann/Withdrawal/.
The database table zwernemann_withdrawal remains and can be removed manually if needed.
- Withdrawal period now starts from the date of the last shipment instead of the order date (legally correct under EU Directive 2011/83/EU)
- If an order has not been shipped yet, withdrawal is always allowed
- Withdrawal deadline display updated accordingly
- Complete withdrawal workflow for logged-in customers and guest orders
- Withdrawal button in order overview and on order details page
- Detail page with order summary and period display
- Confirmation page after successful withdrawal
- Email notifications to customer and shop operator (incl. BCC)
- Admin grid with filtering, sorting, paging, and direct link to order
- Configuration area for module, deadlines, and email settings
- ACL-based permissions and secured REST API
- CSRF protection and JavaScript confirmation dialog
- Full DE/EN translations
- Enabled withdrawal for guest orders
- Success page after submitting withdrawal
- Column "Order placed on" in admin grid
- Action "View Order" in admin grid
- Automatic comment in order history
- Shop email as BCC in confirmation email
- Order details above the withdrawal form
- Initial release
- Tested with Magento 2.4.6 to 2.4.8-p1
- Check and ensure Hyvä theme compatibility
- Extend REST API to include write access
- Individual withdrawal periods per product (via product attributes)
Zwernemann Medienentwicklung
Martin Zwernemann
79730 Murg, Germany
If you have questions, problems, or ideas for new features – feel free to get in touch.
OSL-3.0