Dōrvis

Sign in

Online age verification for Latvian e-shops

Online age verification is mandatory in Latvia for selling alcohol online: the buyer's identity and age must be checked with an electronic identification means before the sale and payment. With Dorvis the buyer confirms with Smart-ID, eParaksts or their bank, and your shop receives a verified personal code from which age can usually be derived.

On this page
  1. What Latvian law requires for online alcohol sales
  2. Which e-identities work for age checks
  3. How the age check runs before payment
  4. How to derive age from a Latvian personal code
  5. Account login and delivery details
  6. How it works

What Latvian law requires for online alcohol sales

Section 6.1 of the Law on the Handling of Alcoholic Beverages allows alcohol retail through a website or mobile app. Before the sale and before payment, the retailer must verify the buyer's identity and age using qualified or qualified high-assurance electronic identification means, or personal electronic identification means that meet the strong customer authentication requirements of the Payment Services Directive (EU) 2015/2366.

The law also restricts delivery and requires a second age check on delivery. Which specific means fit your case is worth confirming with a lawyer; this is not legal advice.

Which e-identities work for age checks

MethodWhat the buyer doesNote
Smart-IDApproves on the phone with PIN1Listed by VDAA among high-assurance and eIDAS-qualified means
eParaksts mobile and eID cardApproves in the eParaksts mobile app or with the cardState e-identity; contract with LVRTC
Bank loginLogs in to their internet bankThe law names strong customer authentication means; check the fit for your case

How the age check runs before payment

  1. The buyer reaches checkout

    If the basket contains alcohol, the shop redirects to Dorvis before payment. With acr_values you offer only the methods you chose.

  2. Confirms identity

    The buyer logs in with Smart-ID, eParaksts or a bank. Dorvis returns name and personal code and keeps an audit log entry.

  3. The shop checks age

    Your server derives the date of birth from the personal code and checks the buyer is 18 or older. The buyer can proceed to payment only after this check.

How to derive age from a Latvian personal code

In an old-format code (DDMMYY-CNNNN) the first six digits are the date of birth and the seventh gives the century. New-format codes issued since 1 July 2017 start with 32 and contain no date of birth (LV portāls). For those buyers you need another check, or decline the sale.

// Returns true if the person is at least 18; null for a new-format code
function isAdult(personCode, today = new Date()) {
  const pc = personCode.replace('-', '');
  if (pc.startsWith('32')) return null; // new-format code – no date of birth
  const day = +pc.slice(0, 2), month = +pc.slice(2, 4), yy = +pc.slice(4, 6);
  const century = { 0: 1800, 1: 1900, 2: 2000 }[pc[6]];
  if (century === undefined) return null;
  const birth = new Date(century + yy, month - 1, day);
  const adult = new Date(birth.getFullYear() + 18, birth.getMonth(), birth.getDate());
  return today >= adult;
}
Illustrative example; test it in your own system before use.

Account login and delivery details

The same integration lets shoppers sign in to their account without a password and fills delivery details with a verified name. If you only need age checks for alcohol, login can stay optional for everyone else.

Whether an e-shop must accept the EUDI wallet is not decided by its sector. The duty arises where law or contract already requires strong user authentication (Regulation (EU) 2024/1183, Article 5f(2)). For an ordinary checkout that is often not the case; the EUDI explainer helps you assess your own shop. Digimaks is free on every plan if you want to offer it. Costs are on the pricing page.

Recommended methods
  • Smart-ID about 1 million users in Latvia
  • eParaksts mobile 540,000+ users
  • Swedbank online banking credentials
  • SEB online banking credentials

How it works

  • 01

    Create an integration

    In the self-service portal you choose methods and get login credentials.

  • 02

    Add the OIDC client

    Your developer connects your portal to Dorvis through OpenID Connect.

  • 03

    Receive verified personal data

    After login your system receives first name, last name and personal code.

Add age verification to your e-shop

The Dorvis team creates your account; you can try the integration in your test environment once test credentials are issued. The first month on paid plans is free.

Loading complete

We use cookies to make this website easier to use. Read our Privacy and Cookie Policy.