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

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.

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 or 11
  • Drupal Commerce 2 or 3

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.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Project categories: E-commerce
  • Ecosystem: Commerce Core
  • Created by bkch on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases