Skip to content
Checkout & Cart Extensions

EU Right of Withdrawal Button for Magento 2

Adds an online withdrawal function to Magento 2 for consumer orders. Customers and guests identify the order, confirm in a second step and receive an email with a proof reference. The module provides the technical function only; you remain responsible for your legal obligations.

  • Free
Free $0.00, in stock
Check requirementsSee the versions and themes listed for this package. Details Ask about setupInclude the package name and your Magento and PHP versions. Ask
$0.00
In stock
SKU
panth-eu-withdrawal
Links
composer require mage2kishan/module-eu-withdrawal
SKU
panth-eu-withdrawal
  • Package requirementsRead the source documentation
  • Developer profileView Upwork profile
  • Themes listedCheck the selected release
  • PHP versions listedCheck the selected release
  • Installation questionsDiscuss your store setup

What it does for your store

The main features, as listed in the module documentation.

  • Button and links

    A floating side button and an account link by default, optional header and footer links, and a button on the order view while the order is in its period.

  • Two-step form

    Order number, email, name and an optional reason, then an order summary and a Confirm withdrawal button. Nothing is recorded before that.

  • Proof email

    The customer email carries a proof reference, the date and time and a snapshot of the withdrawn items. Unsent emails are retried by cron.

  • Admin request grid

    Received, Acknowledged, Refunded and Rejected statuses, internal notes and a panel on the order view. Nothing is refunded automatically.

  • Period and deadlines

    14 days by default from the last shipment or the order date; weekend and listed holiday deadlines move to the next working day.

  • Abuse checks

    Honeypot, minimum fill time, per-IP limits on lookup and submit, and a lock on an order number after repeated failed attempts. Review the limits so the function stays easily accessible.

Installation

Example commands from the Magento root. Follow the package instructions and your staging and deployment process.

  1. 1Check the releaseMatch Magento, PHP, theme and dependency requirements.
  2. 2Install on stagingReview Composer changes and follow the package instructions.
  3. 3Configure and verifyUse the documented settings and test the affected features.
magento-root
$ composer require mage2kishan/module-eu-withdrawal
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
$ bin/magento setup:static-content:deploy -f
$ bin/magento cache:clean

Listed requirements

These are the details supplied in this listing. Confirm the selected release supports your Magento edition, PHP and storefront.

Composer packagemage2kishan/module-eu-withdrawal

Read package requirements and license

Documentation

Product details and setup guidance. Check the package repository for release-specific instructions.

An online withdrawal function for Magento 2

This module adds a withdrawal (cancellation) function to a Magento 2 or Adobe Commerce storefront. Customers and guests open a form from a button or link, identify the order by order number and email address, confirm in a second step and receive an email with a unique proof reference. Staff get a request grid, a panel on the order view, notification emails and refund deadline reminders.

It is built for stores that sell to consumers in the EU. Article 11a of Directive 2011/83/EU, inserted by Directive (EU) 2023/2673, asks traders who conclude contracts through an online interface to offer a withdrawal function, and Member States have applied it since 19 June 2026. The module provides the technical function only. It does not make a store compliant by itself: check your obligations, withdrawal periods and notice texts with your own legal adviser.

Storefront

  • A floating side button and a My withdrawals account link by default, with optional header and footer links. The floating button is hidden on the checkout page.
  • A button on the customer order view while the order is within its withdrawal period.
  • Step 1 asks for order number, email address, name and an optional reason. Logged-in customers pick an order from a list. Step 2 shows the order summary and a Confirm withdrawal button.
  • One request per order; a second attempt shows the status of the first.
  • A signed, pre-filled withdrawal link can be added to order emails.
  • The button label is editable. The default "Cancel my order" does not use the Article 11a(1) wording; review and change it.

Records and emails

  • Each request stores a proof reference, the date and time, a text snapshot of the items and order total, the IP address and the user agent.
  • Set the notification recipient; the default is a placeholder address.
  • The customer confirmation and the admin notification include the proof reference, order number, date and time and the snapshot. Unsent customer emails are retried by cron every 15 minutes.
  • The order gets a status history comment and, if you choose one, a new order status. The module never cancels, credits or refunds an order.
  • A reminder email goes to the admin address 10 days after a request by default, showing the refund due date.

Withdrawal period

The period is 14 days by default, counted from the creation date of the last shipment or from the order date. Under Article 9 of Directive 2011/83/EU the period for goods runs from the day the consumer receives them, which is usually later than the shipment date, so set the number of days with that in mind. For services and digital content, Article 9(2)(a) and (c) count from the conclusion of the contract; use the order date basis. Orders with no shipment yet stay inside the period. Deadlines on a Saturday, Sunday or a public holiday you list move to the next working day.

Notice texts

Default English texts for the right of withdrawal, excluded products, return costs and refunds are based on the model instructions in Annex I(A) of Directive 2011/83/EU. Review and adjust them to your own terms. The default return cost text says the store pays return costs; change it if the customer pays (Article 14(1)). They are editable, and translations ship for en_US, de_DE, fr_FR and nl_NL.

Requirements

  • Magento Open Source or Adobe Commerce 2.4.4 to 2.4.8.
  • PHP 8.1, 8.2, 8.3 or 8.4.
  • Hyvä or Luma.
  • mage2kishan/module-core, installed by Composer.
  • Magento cron and working outgoing email.

Free and open source under the MIT License.

Developer notes

  • Module Panth_EuWithdrawal, PHP namespace Panth\EuWithdrawal. It loads after Magento_Store, Magento_Backend, Magento_Sales, Magento_Ui and Panth_Core. Frontend route withdrawal, admin route panth_euwithdrawal.
  • Database table panth_eu_withdrawal_request, with unique keys on order_id and proof_reference. The status column stores 1 Received, 2 Acknowledged, 3 Refunded or 4 Rejected.
  • Model\WithdrawalService handles order lookup, the withdrawal window, the duplicate check, the content snapshot, submit, the order comment and email dispatch. Model\Config reads the panth_euwithdrawal/* settings.
  • Model\DeadlineCalculator works out withdrawal and refund deadlines in the store time zone, moved past weekends and public holidays. Model\StatusChangeValidator requires a reason when a request is set to Rejected.
  • Model\TokenManager signs pre-filled links with HMAC-SHA256 using the newest key in crypt/key. Tokens signed with an older key are still accepted after a key rotation. There is no built-in fallback key; without crypt/key no token is issued or accepted.
  • Model\RateLimiter keeps per-IP lookup and submit counters in the cache for 10 minutes and a per-order-number failure counter for one hour, under SHA-256 keys. Model\BotGuard runs the honeypot and fill-time checks.
  • Plugin\OrderEmailWithdrawalLink is an afterToHtml plugin on Magento\Sales\Block\Order\Email\Items. Cron\ProcessRequests runs as panth_euwithdrawal_process_requests for confirmation retries and refund reminders.
  • Model\Mail sends the customer confirmation, admin notification, status update and refund reminder emails. Template IDs: panth_euwithdrawal_email_customer_template, panth_euwithdrawal_email_admin_template, panth_euwithdrawal_email_status_template and panth_euwithdrawal_refund_reminder.
  • ACL resources: Panth_EuWithdrawal::config, Panth_EuWithdrawal::withdrawal, Panth_EuWithdrawal::request_view and Panth_EuWithdrawal::request_manage.
Kishan Savaliya

Questions before you install?

Send me your composer.json and I will check for conflicts first. Free. Installation is +$45, custom work is quoted first.

Ask on WhatsApp