Skip to content

The <wallet-verify> element

import '@wallet/verify' // registers <wallet-verify>
import type { WalletVerifyElement, VerifyResult } from '@wallet/verify'
Attribute Default Meaning
endpoint your tenant URL: https://hakim-verify-api.vercel.app/v1/<publishable key>
wallet-name Digital wallet shown in the header, the QR centre and the tag under the QR
wallet-logo image URL for the same places; a square mark works best
session-id adopt an existing session instead of starting a new one (a reloaded page keeps its QR)
claim-values JSON, <element> (or <document id>.<element>) → accepted values, e.g. {"plate_class":["Motorcycle"]}: this session’s request then matches only documents with one of those values, so a holder with several cards of one type is offered just the right one. It narrows your tenant’s request; it can never widen it (web 0.9.3)
tagline Instant approval header subtitle
heading, heading-tap, heading-verified, heading-expired copy above the QR: desktop, phone, done, expired
ask-heading, received-heading We will ask for, We have received list titles
fields, document-labels deprecated in web 0.9.0: the box lists your request by itself (What the box lists)
reload-label Reload QR the button on a dimmed QR
link-host host of the wallet links (https://<host>/w/<id>, https://<host>/open); the Verify API names its own in every session, so leave it unset (Wallet links)
ios-scheme the wallet’s private iOS URL scheme, used when no Universal Link applies
app-link true Android: open the App Link instead of the wallet deep link; false opens openid4vp:// directly
dc-api off also try the browser’s Digital Credentials API on tap
expanded true accordion state
no-header off hide the header row
auto true start a session as soon as the element is shown
idle-timeout 15000 ms before an untouched QR dims and offers Reload (0 = never)
fire-timeout 10000 ms before an unanswered tap dims and offers Reload
Event detail When
session { id, deepLink, expiresAt, linkHost, requested, … } a session started (also after Reload; then POST /new carried { supersedes })
verified the server result with claims, docType, documents the wallet’s answer verified
failed { error } verification failed
cancelled the holder dismissed the request
expired the request expired
toggle { expanded } the header was clicked

All events bubble and cross the shadow boundary.

const el = document.querySelector('wallet-verify')
el.addEventListener('session', (e) => saveSessionId(e.detail.id))
el.addEventListener('verified', (e) => confirmOnServer(e.detail))

“We will ask for” and “We have received” are always exactly what the session asks the wallet for: every document and field of your tenant’s request, in the order the wallet’s consent screen lists them, with the names it uses there (“Given names”, “Photo of holder”, “Date of expiry”). The Verify API sends that list with every session (requested, see Verify API); the page cannot add, drop, rename or reorder a row, so the page, the wallet’s consent and the received values always match.

  • Once verified, the same rows show the received values: the photo as an image, dates as dd/MM/yyyy (as on the wallet’s card), yes/no for age checks.
  • With several documents, the rows group under each document’s name (“Emirates ID”, “Residence Permit”).
  • To change what is asked for or what a field is called, change the tenant’s request (we set it up with you), not the page.
  • A page that still passes fields keeps working; the box ignores it and logs a console warning when it differs from the request. Remove it. (fields and document-labels are only used with a Verify API older than web 0.9.0.)

start(), reload(), cancel(); state (idle, loading, ready, waiting, cancelled, verified, failed), session, result.

CSS custom properties on the element: --wallet-accent, --wallet-accent-tint, --wallet-ink, --wallet-muted, --wallet-line, --wallet-star, --wallet-spinner, --wallet-ok, --wallet-radius, --wallet-frame-size. Fonts are inherited from the page. Parts for deeper styling: card, header, icon, title, tagline, body, heading, frame, status, tag, note, ask, ask-group, reload, spinner.

The defaults are the box the demo sites show: a 220px QR frame (--wallet-frame-size) and 16px corners (--wallet-radius). Set colours only and the box looks and reads the same on every site; give it about 470px of width on a desktop and the full width on a phone. The QR code itself is drawn to the QR spec (crisp black modules on white, a 4-module quiet zone, a small logo in the middle), so phone cameras and wallets read it quickly; keep it that way: don’t shrink the frame or restyle the code.

wallet-verify { --wallet-accent: #235f3f; --wallet-accent-tint: #e9f4ee; --wallet-star: #c2691f; }
wallet-verify::part(card) { box-shadow: none; }
  • Desktop: the QR is scan-only. Phone: tapping it opens the wallet (App Link, Universal Link, private scheme, or openid4vp://).
  • Same device: if the tab regains focus while waiting with no result, the QR dims and offers Reload.
  • Verified: the QR becomes a tick and the same list shows the received values.

Next: the Verify API.