demo · v141

Digital Credential Wallet Preview

A merchant age-verification request builder for the Digital Credentials API. Choose which fields to request, pick a presentation protocol, and trigger navigator.credentials.get() to invoke the real browser wallet handoff when the device supports it.

Origin trial / Android only The Digital Credentials API requires a credential wallet app on the device (e.g. Google Wallet). This page calls the live navigator.credentials.get({ digital: ... }) API and reports the browser result or error directly.
probing Digital Credentials API…

Merchant — Age Verification Request

fields requested from wallet

Tap "Present Credential" to invoke the API.

Wallet request preview

State Motor Vehicles · Digital Driver Licence
J. ████████
DOB: ██/██/████
✓ Age 18+
licence no.████████
expiry12/2029
issued byDMV · State
classC

selective disclosure — fields shared

age_over_18 ✓

before vs. after

Old way — type your age

1
Merchant shows a date-of-birth input.
2
User types full date — merchant receives exact birthday and stores it.
3
Merchant decides age. No cryptographic proof the data is genuine.

New way — present digital credential

1
Merchant calls navigator.credentials.get({ digital: … }).
2
OS shows wallet picker — user consents and selects credential.
3
Wallet returns only requested fields (e.g. age_over_18: true) — issuer-signed, birthday never leaves device.

the call

const result = await navigator.credentials.get({
  digital: {
    requests: [
      {
        protocol: "openid4vp",
        data: {
          presentation_definition: {
            id: "age-verification",
            input_descriptors: [
              {
                id: "mdl",
                format: { mso_mdoc: { alg: ["ES256"] } },
                constraints: {
                  fields: [
                    {
                      path: ["$['org.iso.18013.5.1']['age_over_18']"],
                      intent_to_retain: false,
                    },
                  ],
                },
              },
            ],
          },
        },
      },
    ],
  },
});
// result.data contains the verifiable presentation
console.log(result.data);

see also