Agent Wranglers

ECM-52Required EU law

Never add paid extras through a pre-ticked box

Add a paid extra, such as insurance, gift wrap or a donation, to an EU consumer's order only after they ticked or chose it themselves. Every option that costs money starts unticked.

Region

European Union (EU). The duty comes from the law there. The rule applies only when the project serves people there, and its Applies when also holds.

How to do it

Article 22 of the Consumer Rights Directive requires the consumer's express consent to any payment on top of the main price. Consent by default options, which the consumer must reject to avoid the payment, does not count. The consumer may then claim the money back. The same goes for an extra kept in the cart from an earlier visit or added by a recommendation widget. Keep the main price and the extras as separate lines, so the total in Show the total price with every mandatory fee stays honest. Store on each extra line who added it and when.

Examples

TypeScript example

// Playwright: no paid option starts ticked
const paidOptions = page.locator('form#checkout input[type=checkbox][data-adds-cost]');
for (const option of await paidOptions.all()) await expect(option).not.toBeChecked();

Python example

# Playwright for Python: the same check
from playwright.sync_api import expect

for option in page.locator("form#checkout input[type=checkbox][data-adds-cost]").all():
    expect(option).not_to_be_checked()

How to check

A browser test opens every checkout step as an EU consumer and reads each checkbox and toggle that adds a cost. None is checked when the page loads. A server test places an order with no extras chosen, and its total equals the main lines plus mandatory fees and shipping.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ecommerce/carts-and-checkout/no-pre-ticked-extras">Agent Wranglers e-commerce and fulfilment playbook</a>. In code you write, add a comment next to it with the same link.