EU Withdrawal Button
zwernemann/module-withdrawal
Implements the EU right of withdrawal via button click as required by EU Directive 2023/2673, adding a clearly visible withdrawal button to the customer account area for easy contract cancellation starting June 2026.
Build Tests
Code Quality
Tested on Magento 2.4.8-p4
Recent Test History
Each release is tested against the latest Magento version at that time.
Top Contributors
View LeaderboardShare This Module's Status
README
Loaded from GitHubWithdrawal Button for Magento 2
Magento 2 extension for implementing the EU right of withdrawal via button click.
What is it about?
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.
What does the module do?
For your customers
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.
For you as a shop operator
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
Hyvä Theme Compatibility
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.
REST API
Withdrawal entries can also be retrieved programmatically:
GET /rest/V1/zwernemann/withdrawals`
Access is protected by ACL permission (Zwernemann_Withdrawal::withdrawals).
Multilingualism
Completely translated into German and English (97 strings). Further languages can be added via custom CSV files.
System Requirements
| 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.
Installation
Via ZIP file
-
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
Via Composer
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
Setup
- 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
Linking the Guest Order Form
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.
Uninstallation
php bin/magento module:disable Zwernemann_Withdrawal
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
Then delete the directory app/code/Zwernemann/Withdrawal/.
The database table zwernemann_withdrawal remains and can be removed manually if needed.
Version History
1.2.0
- 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
1.1.0
- 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
1.0.3
- Enabled withdrawal for guest orders
- Success page after submitting withdrawal
1.0.2
- Column "Order placed on" in admin grid
- Action "View Order" in admin grid
- Automatic comment in order history
1.0.1
- Shop email as BCC in confirmation email
- Order details above the withdrawal form
1.0.0
- Initial release
- Tested with Magento 2.4.6 to 2.4.8-p1
Planned
- Check and ensure Hyvä theme compatibility
- Extend REST API to include write access
- Individual withdrawal periods per product (via product attributes)
Contact & Support
Zwernemann Medienentwicklung
Martin Zwernemann
79730 Murg, Germany
If you have questions, problems, or ideas for new features – feel free to get in touch.
License
OSL-3.0
This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.