Skip to main content
Age verification stops checkout until the customer has proven they are old enough. It applies to the whole session, not a single payment method. The customer authenticates with BankID or MitID. This is currently only available for customers in Norway, Sweden, and Denmark. In hosted checkout they are asked to verify before they can choose a payment method. If you drive checkout yourself, follow the complete-age-verification operation.

How It Works

  1. Enable age_verification on the session (or session profile).
  2. The customer opens checkout and verifies their age before they can pay.
  3. They authenticate with BankID or MitID.
  4. The session records AGE_VERIFICATION_COMPLETED with verified_identity.age_over.
  5. Checkout continues as usual. The transaction copies that identity unless the payment type already has one.

Step-by-Step Implementation

1. Configure the Session

Set age_verification on POST /v1/sessions:

2. Customer Completes Verification

Hosted checkout. Nothing extra to build. Checkout asks the customer to verify their age before they can pick a payment method, then sends them to BankID or MitID and brings them back to the session. Custom or API checkout. If you start a payment while verification is still required, the response contains only this operation:
Send the customer to href. After they pass, they come back with sid. Retry the payment. The operation is gone once age_over meets minimum_age_required.
Starting verification again reuses the pending identity-provider URL for a few minutes, so the customer is not sent through BankID or MitID twice.

3. Receive the Session Event

A successful verification appends AGE_VERIFICATION_COMPLETED. The national identity number is never included.
When the transaction is created, that verified_identity is copied onto it.

Configuration Options

The identity provider country is taken from, in order:
  1. order.billing_address.country
  2. order.shipping_address.country
  3. configuration.countries.preferred_country
If the country is missing or unsupported, the customer picks from the providers above.

Verified Age

The exact age is not stored. age_over is the highest of 21, 18, 16, and 15 that the customer meets, and that is still at least minimum_age_required.

Failures and Redirects

If verification fails or is cancelled, the customer is sent back to the session URL with error and merchant_reference (when available). Embed context (ui, sdk) is kept.

Direct Pay

POST /v1/sessions/{session_id}/pay is blocked until verification completes:
Send the customer to redirect_url, then retry the pay request.
The customer has to complete verification themselves. Merchant-initiated or headless pay can still use age verification if you send the customer to redirect_url first, but it may not fit flows where no customer is present.

Identity Verification

If a payment type on the session also needs identity verification, age verification collects that identity at the same time. The customer is not asked to authenticate twice. The national identity number is never exposed on the session event or on the transaction in API responses. If the payment type later verifies identity itself, that identity is kept on the transaction.

See Also

Last modified on September 3, 2026