Verifying an External Reader mdoc Response

Submit the decrypted mdoc response after your kiosk completes the reader exchange. The kiosk owns device engagement, the reader key, session encryption, ReaderAuth, and termination.

Prerequisites

  • Enable proximity-verifier in config/_features.conf; it is off by default
  • Keep the exact engagement, reader public COSE key, and handover bytes from the exchange
  • Configure the credential policies your deployment requires, including issuer trust when applicable; a signature check alone does not establish issuer trust
  • Authenticate as a client allowed to create sessions on the verifier service

Submit the Response

Create and complete a session in one call. There is no session to create before the tap.

CURL

Endpoint: POST /v2/{target}/verifier-service-api/verification-session/proximity/device-response

Example Request
curl -X POST \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v2/{target}/verifier-service-api/verification-session/proximity/device-response' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
    "flow_type": "iso_18013_5_external_reader",
    "core_flow": {
      "requestedElements": {
        "org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": ["family_name"] }
      }
    },
    "deviceResponse": "{base64DeviceResponse}",
    "deviceEngagement": "{base64DeviceEngagement}",
    "eReaderKey": "{base64PublicCoseKey}",
    "handover": "qr"
  }'

Path Parameters

  • orgID: String (required) - Your organization hostname prefix
  • target: String (required) - Your verifier service resource path, {organization}.{tenant}.{service}

Header Parameters

  • Authorization: String (required) - Bearer token with the verifier-session create permission

Body Parameters

  • flow_type: String (required) - iso_18013_5_external_reader
  • core_flow: Object (required) - The usual query, policies, webhook, and request retention settings; use dcql_query or requestedElements
  • deviceResponse: String (required) - Standard base64 of the decrypted DeviceResponse CBOR inside SessionData
  • deviceEngagement: String (required) - Standard base64 of the exact engagement CBOR
  • eReaderKey: String (required) - Standard base64 of the exact reader public COSE_Key bytes; never send the private key
  • handover: String or Object (required) - "qr" for null handover, or {"type":"nfc","handoverSelect":"{base64Select}"} for static NFC handover. Negotiated NFC also supplies handoverRequest with the exact request bytes

Example Response

The public session includes id, terminal status, policy_results, and the presented credentials. Use status together with policy_results for the access decision. A 200 response alone does not mean access should be granted.

Response Codes

  • 200 - A public verification session with terminal status SUCCESSFUL or FAILED; inspect status and policy results before granting access
  • 400 - Invalid request or presentation encoding; no session is created
  • 404 - The proximity feature is disabled
  • 401 / 403 - Authentication or session-create authorization failed

The response is the same public session representation returned by the info endpoint. Normal session inspection, deletion, and PII-purge operations apply. Retention settings govern how long the result remains available.

One terminal update is emitted: presentation_validation_failed when mdoc validation fails, or credential_policy_results_available after policies decide the outcome. The endpoint does not emit the intermediate wallet-flow events.

Close the Reader Exchange

The kiosk sends termination SessionData itself with status 20 (SESSION_TERMINATION). DeviceResponse status 0 means the wallet returned documents; it is not the reader's termination status.

Preserve signed and transcript bytes exactly. The verifier does not receive the DeviceRequest and cannot attest to which elements your kiosk requested. Each authorized submission creates a new session, including an identical repeated submission; session usage modes do not deduplicate separate creation calls.

Next Steps

Last updated on November 26, 2026