This project is not covered by Drupal’s security advisory policy.

Together for youth protection!

Age Verification (MRZ) adds a simple age check to Drupal Commerce shops. Customers enter the MRZ code (machine-readable zone) of their ID card or passport, and the module verifies the code and checks that the customer is old enough to buy age-restricted products. The MRZ itself is never stored.

Features

  • Validates MRZ codes of ID cards and passports (ICAO 9303 formats TD1, TD2 and TD3), including check digits and expiry date.
  • Calculates the customer's age from the date of birth in the MRZ.
  • Privacy by design: the MRZ is never saved or logged. Only the result (verified age and date) is kept.
  • Logged-in customers verify once; the result is stored on their account.
  • Guests verify on every order; the result is stored on the order only.
  • Default minimum age for the whole shop, with an optional minimum age per product. The highest age in the cart applies.
  • Report of placed orders with their verification status.
  • Translations: German, French, Italian.

Post-Installation

Enable the module, set the default minimum age in the module settings and, if needed, set a minimum age on individual products. The age check then appears automatically in the checkout for orders that contain age-restricted products.

Additional Requirements

  • Drupal 10.3+ or 11
  • Drupal Commerce 2.41+ or 3.3+
  • PHP 8.1+

Limitations

MRZ validation checks that a code is well-formed and consistent. It cannot prove that the document is genuine or that it belongs to the person ordering. Check whether this is sufficient for the legal requirements in your country.

Supporting organizations

Development sponsored by Blaues Kreuz Schweiz.

Supporting this Module

This module is free. Perspectives for life – your donation to the Blue Cross makes them possible: support our addiction work with a donation – thank you!

Perspektiven für's Leben – Ihre Spende für das Blaue Kreuz macht sie möglich: Unterstützen Sie unsere Suchtarbeit mit einer Spende – merci!

Project information

Releases