Agent Wranglers

ECM-31Recommended

Start the withdrawal period when the last item arrives

Compute each EU order's withdrawal deadline from the delivery of its last item when one order arrives in several parcels. Use the first delivery for subscriptions to regular goods.

How to do it

Article 9(2)(b) of the Consumer Rights Directive starts the 14 days when the consumer, or someone they named other than the carrier, has the goods. For several goods in one order delivered apart, it starts with the last one. For one good in several pieces, it starts with the last piece. For regular deliveries over a period, it starts with the first. Take the delivery date from carrier events, as Update delivery status from carrier events describes. Store the computed deadline on the order, and use it in the button from Add the EU withdrawal button and in return checks.

Examples

TypeScript example

const WITHDRAWAL_DAYS = 14;

export function withdrawalDeadline(deliveries: Date[], kind: 'one_order' | 'regular_delivery'): Date {
  const times = deliveries.map(d => d.getTime());
  const start = kind === 'regular_delivery' ? Math.min(...times) : Math.max(...times);
  const deadline = new Date(start);
  deadline.setUTCDate(deadline.getUTCDate() + WITHDRAWAL_DAYS);
  return deadline;
}

Python example

from datetime import date, timedelta
WITHDRAWAL_DAYS = 14

def withdrawal_deadline(deliveries: list[date], kind: str) -> date:
    start = min(deliveries) if kind == "regular_delivery" else max(deliveries)
    return start + timedelta(days=WITHDRAWAL_DAYS)

How to check

A unit test delivers an order in two parcels on 1 March and 6 March. The deadline is 20 March for both items. A subscription delivered first on 1 March has a deadline of 15 March.

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/returns-and-refunds/withdrawal-period-per-shipment">Agent Wranglers e-commerce and fulfilment playbook</a>. In code you write, add a comment next to it with the same link.