---
title: "Start the withdrawal period when the last · Agent Wranglers"
url: https://agentwranglers.se/playbook/ecommerce/returns-and-refunds/withdrawal-period-per-shipment
id: ECM-31
level: Recommended
updated: 2026-10-22
tokens: 1005
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Start the withdrawal period when the last item arrives

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Returns and refunds](https://agentwranglers.se/playbook/ecommerce/returns-and-refunds.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: ECM-31
- Level: Recommended
- Chapter: [Returns and refunds](https://agentwranglers.se/playbook/ecommerce/returns-and-refunds.md)
- Rule: 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.
- 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.
- How: 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](https://agentwranglers.se/playbook/ecommerce/shipping-and-delivery/carrier-tracking-events.md) describes. Store the computed deadline on the order, and use it in the button from [Add the EU withdrawal button](https://agentwranglers.se/playbook/payments/subscriptions/eu-withdrawal-button.md) and in return checks.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### TypeScript example

```ts
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

```python
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)
```

## Sources

- [Consumer Rights Directive 2011/83/EU, Article 9](https://eur-lex.europa.eu/eli/dir/2011/83/oj)

## Related rules

- ECM-19 [Group order lines into shipments](https://agentwranglers.se/playbook/ecommerce/orders-and-fulfilment/shipments.md) in E-commerce and fulfilment
- ECM-27 [Update delivery status from carrier events](https://agentwranglers.se/playbook/ecommerce/shipping-and-delivery/carrier-tracking-events.md) in E-commerce and fulfilment
- PAY-33 [Add the EU withdrawal button](https://agentwranglers.se/playbook/payments/subscriptions/eu-withdrawal-button.md) in Payments and billing

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/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.

- Previous: [Give the withdrawal information before the order and in the confirmation](https://agentwranglers.se/playbook/ecommerce/returns-and-refunds/withdrawal-information.md)
- Next: [Mark the products that have no right of withdrawal](https://agentwranglers.se/playbook/ecommerce/returns-and-refunds/withdrawal-exceptions.md)
- [Returns and refunds](https://agentwranglers.se/playbook/ecommerce/returns-and-refunds.md)
