---
title: "Verifying SD-JWT VC Credentials via OID4VP"
description: "Learn how to request and verify SD-JWT VC via OID4VP using the walt.id Verifier2 API."
stack: "Community Stack (open source) — version 1.2.1"
stack_version: "1.2.1"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/community-stack/verifier2/credential-verification/sd-jwt-vc-oid4vp
generated: 2026-11-11
---
# Verifying SD-JWT VC credentials via OID4VP

Video: https://youtu.be/7jTb4DAWHMo

This guide shows you how to verify [**SD-JWT VC**](https://docs.walt.id/concepts/digital-credentials/sd-jwt-vc.md) credentials using the Verifier2 API via [**OpenID for Verifiable Presentations (OID4VP)**](https://docs.walt.id/concepts/data-exchange-protocols/openid4vp.md)

[**SD-JWT VCs**](https://docs.walt.id/concepts/digital-credentials/sd-jwt-vc.md): Credentials based on the [IETF SD-JWT VC standard](https://datatracker.ietf.org/doc/draft-ietf-oauth-sd-jwt-vc/) which support selective disclosure, allowing users to share only specific claims from their credentials.

[**OID4VP**](https://docs.walt.id/concepts/data-exchange-protocols/openid4vp.md): A protocol specifying how parties can present VCs in a way that's consistent and secure across platforms ensuring interoperability.

**Note:**

If you're migrating from the original Verifier (v1), see the [Migration Guide](https://docs.walt.id/community-stack/verifier2/migration-from-verifier1.md).

## Prerequisites

Before you begin, ensure you have:

- **Verifier2 API running** — Follow the [Getting Started](https://docs.walt.id/community-stack/verifier2/getting-started.md) or [Setup](https://docs.walt.id/community-stack/verifier2/setup.md) guide
- **A test wallet with credentials** — Use the [walt.id Wallet](https://docs.walt.id/community-stack/wallet/getting-started.md) for testing, or any OID4VP-compatible wallet
- **Publicly accessible URL** (for local development) — Use [ngrok](https://ngrok.com) or similar to expose `http://localhost:7004` if testing with a mobile wallet

**Note:**

**Local Development:** When running locally via Docker, the API is available at `http://localhost:7004` by default, whether standalone or via Docker Compose. Use this as your base URL in the examples below.

---

## Example 1: Basic Verification

This example requests an SD-JWT identity credential and verifies its signature.

**Option: CURL**

**Endpoint:** `POST /verification-session/create` | [API Reference](https://verifier2.portal.test.waltid.cloud/swagger/index.html#/Verification%20Session%20Management/post_verification_session_create)

##### Example Request

```bash
curl -X 'POST' \
  'http://localhost:7004/verification-session/create' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "flow_type": "cross_device",
  "core_flow": {
    "dcql_query": {
      "credentials": [
        {
          "id": "credential_1",
          "format": "dc+sd-jwt",
          "meta": {
            "vct_values": [
              "https://issuer.demo.walt.id/draft13/identity_credential"
            ]
          }
        }
      ]
    }
  }
}'
```

**Body Parameters**

- **flow_type**: _String_ (required) - Specifies how the credential request will be delivered to the holder's wallet. Options:
  - `"cross_device"` — User scans a QR code on a different device (e.g. desktop browser → phone wallet)
  - `"same_device"` — User clicks a deep link on the same device (e.g. phone browser → wallet app on same phone)
  - `"dc_api_openid4vp"` — Browser/OS-native Digital Credentials API (Chrome, Safari, iOS/Android native) using OpenID4VP.
  - `"dc_api_18013_7"` — Browser/OS-native Digital Credentials API (Chrome, Safari, iOS/Android native) using ISO 18013-7.

- **core_flow**: _Object_ (required) - Defines what credentials to request and which policies to apply. Contains:
  - **dcql_query**: _Object_ (required) - Specifies the credential type, format, and claims to request using the [DCQL query language](https://identity.foundation/credential-query-language/). You can also use the DCQL builder [here](https://dcql.walt.id/).
    - **credentials**: _Array_ - List of credential queries. Each credential query contains:
      - **id**: _String_ - Unique identifier for this credential in the request (used in policy results)
      - **format**: _String_ - Credential format. For SD-JWT VCs, use the `"dc+sd-jwt"`.
      - **meta.vct_values**: _Array_ - List of of credential types. Example: `["https://issuer.demo.walt.id/draft13/identity_credential"]`.
      - **claims**: _Array_ (optional) - Specific claims to request from the credential. Each claim has a `path` (JSON path to the claim). If omitted, all claims that are non-selectively disclosable are provided by the wallet.
  - **policies**: _Object_ (optional) - Validation rules applied to the received credential. Defaults to signature verification only if omitted.
    - **vc_policies**: _Array_ - Policies applied to individual credentials. Each policy has a `policy` field specifying the policy name. Available policies: `signature`, `expired`, `not-before`, `revoked-status-list`, `schema`, and more. See [Policies](https://docs.walt.id/community-stack/verifier2/policies/overview.md) for the complete list.
    - **vp_policies**: _Array_ (optional) - Policies applied to the entire presentation (not shown in this example)
  - **signed_request**: _Boolean_ (optional) - Whether to sign the authorization request JWT. Required for HAIP profile compliance and DC API Annex C (ISO 18013-7) flows. Defaults to `false`. See [Signed Requests](#signed-requests) to learn more.
  - **encrypted_request**: _Boolean_ (optional) - Sign the Request Object and encrypt it to a key the wallet POSTs to the request URI. Defaults to `false`. Cross-device sessions only; DC API creation rejects it. Requires a signing key and a client identifier that permits signed requests. See [Encrypted Request Objects](#encrypted-request-objects).
  - **encrypted_response**: _Boolean_ (optional) - Whether the wallet should encrypt the VP token response. Defaults to `false`. See [Encrypted Responses](#encrypted-responses) to learn more.
  - **reattemptable**: _Boolean_ (optional) - Whether the session keeps accepting presentations until it expires. Defaults to `true`. Set to `false` to reject further presentations and authorization-request fetches after the first successful presentation. A failed attempt can still be retried. On a same-device request, set this inside `core` rather than `core_flow`.
  - **key**: _Object_ (optional) - Signing key for this verification session. Overrides the service-wide default `key` configured via the[`verifier-service.conf`](https://docs.walt.id/community-stack/verifier2/configurations/config-files/verifier-service.md#key-optional). Must be a serialized key in the format `{"type":"jwk","jwk":{...}}`. Required when `signed_request: true`, `encrypted_request: true`, or `encrypted_response: true` and no service-wide default is configured. See [Signed Requests](#signed-requests), [Encrypted Request Objects](#encrypted-request-objects), and [Encrypted Responses](#encrypted-responses) for when this is needed.
  - **x5c**: _Array of Strings_ (optional) - X.509 certificate chain for this verification session. Overrides the service-wide default `x5c` configured via  [`verifier-service.conf`](https://docs.walt.id/community-stack/verifier2/configurations/config-files/verifier-service.md#x5c-optional). Must be an ordered chain in DER-encoded, Base64-encoded format where the first certificate corresponds to the `key`. Required for X.509-based client authentication (`x509_san_dns:` or `x509_hash:` as `clientId`) and signed Annex C requests. See [Signed Requests](#signed-requests) to learn more.
  - **verifier_info**: _Object_ (optional) - An array of attestations about the Verifier relevant to the Credential Request. Each object is a JSON object with the following fields:
    - **format**: _String_ - The format of the attestation. Currently only `"jwt"` is supported.
    - **data**: _String_ - The attestation data in JWT format.
    - **credentialIds**: _Array_ (optional) - Specifies which credentials in your DCQL query this attestation applies to. References the `id` fields from your `credentials` array in the DCQL query. If omitted, the attestation applies to all requested credentials.

- **openid**: _Object_ (optional) - OpenID4VP-specific extensions
  - **transactionData**: _Array_ (optional) - Bind the credential presentation to a specific transaction (e.g., payment authorization, account access). Each entry references credential IDs and includes transaction details. See [Transaction Data Authorization](#transaction-data-authorization) for full documentation.

- **url_config**: _Object_ (optional) - URL configuration for this session. Only applies to `cross_device` and `same_device` flows (not `dc_api`).
  - **url_prefix**: _String_ (optional) - The publicly accessible base URL where the wallet will fetch the authorization request and post its response. Overrides the `urlPrefix` from `verifier-service.conf`.
    - The service constructs: Request URI: `{urlPrefix}/{sessionId}/request` and Response URI: `{urlPrefix}/{sessionId}/response`
    - **Must be reachable by the wallet** (use ngrok or public URL for local development)
  - **url_host**: _String_ (optional) - The base URL used to construct the authorization request link. Overrides the `urlHost` from `verifier-service.conf`.
    - For standard OID4VP flows, use `"openid4vp://authorize"` (default)
    - For custom authorization endpoints (e.g. conformance testing), provide a full HTTPS URL

- **redirects**: _Object_ (optional) - Success and error redirect URLs (only for `cross_device` and `same_device` flows)
  - **success_redirect_uri**: _String_ - URL to redirect the user after successful verification
  - **error_redirect_uri**: _String_ - URL to redirect the user if verification fails

**Note:**

  Many parameters have defaults configured in `verifier-service.conf`. Request-level parameters override these defaults for that specific session only. See [Configuration Defaults](#configuration-defaults) below.

---

##### Example Response

```json
{
  "sessionId": "14d60fa2-4e7d-4a34-a291-80da0e053fab",
  "bootstrapAuthorizationRequestUrl": "openid4vp://authorize?client_id=verifier2&request_uri=https%3A%2F%2Ff5dc-2a02-8388-17c1-5580-bddd-6845-3edf-388f.ngrok-free.app%2Fverification-session%2F14d60fa2-4e7d-4a34-a291-80da0e053fab%2Frequest",
  "fullAuthorizationRequestUrl": "openid4vp://authorize?response_type=vp_token&client_id=verifier2&state=a697ef7d-fc66-4ccd-b79a-3aa1b93836df&response_mode=direct_post&nonce=4c44c117-2d26-4838-b42f-52b0e0faa070&response_uri=https%3A%2F%2Ff5dc-2a02-8388-17c1-5580-bddd-6845-3edf-388f.ngrok-free.app%2Fverification-session%2F14d60fa2-4e7d-4a34-a291-80da0e053fab%2Fresponse&dcql_query=%7B%22credentials%22%3A%5B%7B%22id%22%3A%22credential_1%22%2C%22format%22%3A%22dc%2Bsd-jwt%22%2C%22meta%22%3A%7B%22vct_values%22%3A%5B%22https%3A%2F%2Fissuer.demo.walt.id%2Fdraft13%2Fidentity_credential%22%5D%7D%7D%5D%7D&client_metadata=%7B%22vp_formats_supported%22%3A%7B%22mso_mdoc%22%3A%7B%22issuerauth_alg_values%22%3A%5B-7%2C-9%2C-50%5D%2C%22deviceauth_alg_values%22%3A%5B-7%2C-9%2C-50%2C-65537%5D%7D%7D%2C%22client_name%22%3A%22Verifier2%22%2C%22logo_uri%22%3A%22https%3A%2F%2Fimages.squarespace-cdn.com%2Fcontent%22%2C%22tos_uri%22%3A%22https%3A%2F%2Fexample.com%2Fterms%22%2C%22policy_uri%22%3A%22https%3A%2F%2Fexample.com%2Fprivacy%22%2C%22client_uri%22%3A%22https%3A%2F%2Fverifier.example.com%22%2C%22client_name%23fr-FR%22%3A%22V%C3%A9rificateur2%22%2C%22logo_uri%23fr-FR%22%3A%22https%3A%2F%2Fexample.com%2Flogo-fr.png%22%2C%22tos_uri%23fr-FR%22%3A%22https%3A%2F%2Fexample.com%2Fterms-fr%22%2C%22policy_uri%23fr-FR%22%3A%22https%3A%2F%2Fexample.com%2Fprivacy-fr%22%2C%22client_uri%23fr-FR%22%3A%22https%3A%2F%2Fverifier.example.com%2Ffr%22%7D"
}
```

**Response Fields:**

- **sessionId**: _String_ - The unique ID of this verification session. Use this to query the session status.
- **bootstrapAuthorizationRequestUrl**: _String_ - Shortened URL using `request_uri` by reference. **Use this for QR codes** to minimize QR code density.
- **fullAuthorizationRequestUrl**: _String_ - Complete URL with all parameters embedded. Use this if the wallet doesn't support `request_uri` (rare).

## Presenting the Request to the User

After creating the session, you need to present the authorization request to the user based on the flow type you chose.

### Cross-Device Flow (QR Code)

1. **Generate a QR code** from the `bootstrapAuthorizationRequestUrl`
2. **Display the QR code** to the user on your web page or application
3. **User scans the QR code** with their wallet app
4. **Wallet presents the credential** and posts the response to your verifier
5. **Monitor the session status** by polling the session endpoint or using SSE/callbacks (see below)

### Same-Device Flow (Deep Link)

1. **Redirect the user** to the `bootstrapAuthorizationRequestUrl`
2. **User's wallet app opens** automatically (via deep link)
3. **Wallet presents the credential** and posts the response to your verifier
4. **User is redirected** to your `successRedirectUri` or `errorRedirectUri`
5. **Query the session status** to retrieve the verification results

## Checking Verification Results
You can query the verification session to check if the user has presented their credential and whether validation succeeded.

**Option: CURL**

**Endpoint:** `GET /verification-session/{sessionId}/info` | [API Reference](https://verifier2.portal.test.waltid.cloud/swagger/index.html#/Verification%20Session%20Management/get_verification_session__sessionId__info)

##### Example Request

```bash
curl -X 'GET' \
  'http://localhost:7004/verification-session/14d60fa2-4e7d-4a34-a291-80da0e053fab/info' \
  -H 'accept: application/json'
```

**Path Parameters**

- **sessionId**: _String_ (required) - The unique ID of the verification session returned when you created the session. Use this to query the current status and results.

---

##### Example Response

```json
{
  "id": "14d60fa2-4e7d-4a34-a291-80da0e053fab",
  "setup": {
    "flow_type": "cross_device",
    "core_flow": {
      "dcql_query": {
        "credentials": [
          {
            "id": "credential_1",
            "format": "dc+sd-jwt",
            "multiple": false,
            "meta": {
              "vct_values": [
                "https://issuer.demo.walt.id/draft13/identity_credential"
              ],
              "format": "dc+sd-jwt"
            },
            "require_cryptographic_holder_binding": true
          }
        ]
      },
      "signed_request": false,
      "encrypted_response": false,
      "policies": {}
    },
    "url_config": {}
  },
  "creationDate": "2026-05-13T14:14:52.688020004Z",
  "expirationDate": "2026-05-13T14:19:52.688020004Z",
  "retentionDate": "2036-05-13T14:14:52.688020004Z",
  "status": "SUCCESSFUL",
  "attempted": true,
  "reattemptable": true,
  "bootstrapAuthorizationRequest": {
    "client_id": "verifier2",
    "request_uri": "https://f5dc-2a02-8388-17c1-5580-bddd-6845-3edf-388f.ngrok-free.app/verification-session/14d60fa2-4e7d-4a34-a291-80da0e053fab/request"
  },
  "bootstrapAuthorizationRequestUrl": "openid4vp://authorize?client_id=verifier2&request_uri=https%3A%2F%2Ff5dc-2a02-8388-17c1-5580-bddd-6845-3edf-388f.ngrok-free.app%2Fverification-session%2F14d60fa2-4e7d-4a34-a291-80da0e053fab%2Frequest",
  "authorizationRequest": {
    "response_type": "vp_token",
    "client_id": "verifier2",
    "state": "a697ef7d-fc66-4ccd-b79a-3aa1b93836df",
    "response_mode": "direct_post",
    "nonce": "4c44c117-2d26-4838-b42f-52b0e0faa070",
    "response_uri": "https://f5dc-2a02-8388-17c1-5580-bddd-6845-3edf-388f.ngrok-free.app/verification-session/14d60fa2-4e7d-4a34-a291-80da0e053fab/response",
    "dcql_query": {
      "credentials": [
        {
          "id": "credential_1",
          "format": "dc+sd-jwt",
          "multiple": false,
          "meta": {
            "vct_values": [
              "https://issuer.demo.walt.id/draft13/identity_credential"
            ],
            "format": "dc+sd-jwt"
          },
          "require_cryptographic_holder_binding": true
        }
      ]
    },
    "client_metadata": {
      "vp_formats_supported": {
        "mso_mdoc": {
          "issuerauth_alg_values": [-7, -9, -50],
          "deviceauth_alg_values": [-7, -9, -50, -65537]
        }
      },
      "client_name": "Verifier2",
      "logo_uri": "https://images.squarespace-cdn.com/content",
      "tos_uri": "https://example.com/terms",
      "policy_uri": "https://example.com/privacy",
      "client_uri": "https://verifier.example.com"
    }
  },
  "authorizationRequestUrl": "openid4vp://authorize?response_type=vp_token&client_id=verifier2&state=a697ef7d-fc66-4ccd-b79a-3aa1b93836df&response_mode=direct_post&nonce=4c44c117-2d26-4838-b42f-52b0e0faa070&response_uri=https%3A%2F%2Ff5dc-2a02-8388-17c1-5580-bddd-6845-3edf-388f.ngrok-free.app%2Fverification-session%2F14d60fa2-4e7d-4a34-a291-80da0e053fab%2Fresponse&dcql_query=%7B%22credentials%22%3A%5B%7B%22id%22%3A%22credential_1%22%2C%22format%22%3A%22dc%2Bsd-jwt%22%2C%22meta%22%3A%7B%22vct_values%22%3A%5B%22https%3A%2F%2Fissuer.demo.walt.id%2Fdraft13%2Fidentity_credential%22%5D%7D%7D%5D%7D&client_metadata=%7B%22vp_formats_supported%22%3A%7B%22mso_mdoc%22%3A%7B%22issuerauth_alg_values%22%3A%5B-7%2C-9%2C-50%5D%2C%22deviceauth_alg_values%22%3A%5B-7%2C-9%2C-50%2C-65537%5D%7D%7D%2C%22client_name%22%3A%22Verifier2%22%2C%22logo_uri%22%3A%22https%3A%2F%2Fimages.squarespace-cdn.com%2Fcontent%22%2C%22tos_uri%22%3A%22https%3A%2F%2Fexample.com%2Fterms%22%2C%22policy_uri%22%3A%22https%3A%2F%2Fexample.com%2Fprivacy%22%2C%22client_uri%22%3A%22https%3A%2F%2Fverifier.example.com%22%7D",
  "requestMode": "REQUEST_URI",
  "policies": {
    "vp_policies": {
      "dc+sd-jwt": [
        "dc+sd-jwt/audience-check",
        "dc+sd-jwt/kb-jwt_signature",
        "dc+sd-jwt/nonce-check",
        "dc+sd-jwt/sd_hash-check"
      ]
    },
    "vc_policies": [
      {
        "policy": "signature",
        "id": "signature"
      }
    ]
  },
  "policy_results": {
    "vp_policies": {
      "credential_1": {
        "dc+sd-jwt/audience-check": {
          "policy_executed": {
            "policy": "dc+sd-jwt/audience-check",
            "id": "dc+sd-jwt/audience-check",
            "description": "Check if presentation audience matches expected audience for session"
          },
          "success": true,
          "results": {
            "presentation_audience": "verifier2",
            "expected_audience": "verifier2"
          },
          "errors": [],
          "execution_time": "PT0.000992042S"
        },
        "dc+sd-jwt/kb-jwt_signature": {
          "policy_executed": {
            "policy": "dc+sd-jwt/kb-jwt_signature",
            "id": "dc+sd-jwt/kb-jwt_signature",
            "description": "Verify the KB-JWTs signature with the holders key"
          },
          "success": true,
          "results": {
            "holder_key_jwk": {
              "kty": "OKP",
              "crv": "Ed25519",
              "kid": "v1sbluyFJrMT6Lt46S4N_CBH1g7OWHpm_f3uK93dSLE",
              "x": "jxQwRV7tHc3W_JkKVsDZL7_DtP4zyNJtQ4Yr1z7-Md4"
            }
          },
          "errors": [],
          "execution_time": "PT0.002432834S"
        },
        "dc+sd-jwt/nonce-check": {
          "policy_executed": {
            "policy": "dc+sd-jwt/nonce-check",
            "description": "Check if presentation nonce matches expected nonce for session"
          },
          "success": true,
          "results": {},
          "errors": [],
          "execution_time": "PT0.001029042S"
        },
        "dc+sd-jwt/sd_hash-check": {
          "policy_executed": {
            "policy": "dc+sd-jwt/sd_hash-check",
            "description": "Verify SD-JWT Key Binding by recalculating SD Hashes"
          },
          "success": true,
          "results": {
            "presentation_sdhash": "KQKyptFb7obYaGPDRQvNHEKCSispCoFYGmbe1WUR_wI",
            "recalculated_sdhash": "KQKyptFb7obYaGPDRQvNHEKCSispCoFYGmbe1WUR_wI"
          },
          "errors": [],
          "execution_time": "PT0.003427750S"
        }
      }
    },
    "vc_policies": [
      {
        "policy": {
          "policy": "signature",
          "id": "signature"
        },
        "success": true,
        "result": {
          "verification_result": true,
          "verified_data": {
            "given_name": "John",
            "family_name": "Doe",
            "email": "johndoe@example.com",
            "phone_number": "+1-202-555-0101",
            "address": {
              "street_address": "123 Main St",
              "locality": "Anytown",
              "region": "Anystate",
              "country": "US"
            },
            "is_over_18": true,
            "is_over_21": true,
            "is_over_65": true,
            "vct": "https://issuer.demo.walt.id/draft13/identity_credential"
          }
        }
      }
    ],
    "overallSuccess": true
  },
  "presented_credentials": {
    "credential_1": [
      {
        "type": "vc-sd_jwt",
        "format": "dc+sd-jwt",
        "credentialData": {
          "given_name": "John",
          "family_name": "Doe",
          "email": "johndoe@example.com",
          "phone_number": "+1-202-555-0101",
          "address": {
            "street_address": "123 Main St",
            "locality": "Anytown",
            "region": "Anystate",
            "country": "US"
          },
          "is_over_18": true,
          "is_over_21": true,
          "is_over_65": true,
          "vct": "https://issuer.demo.walt.id/draft13/identity_credential"
        },
        "issuer": "did:key:z6MkjoRhq1jSNJdLiruSXrFFxagqrztZaXHqHGUTKJbcNywp"
      }
    ]
  }
}
```

**Key Response Fields:**

- **id**: _String_ - The verification session ID
- **setup**: _Object_ - The complete session configuration that was used to create this verification session (the `VerificationSessionSetup` from the create request)
- **creationDate**: _String_ - ISO 8601 timestamp when the session was created
- **expirationDate**: _String_ - ISO 8601 timestamp when the session expires (default: 10 minutes after creation). New presentations and authorization-request fetches are rejected after this time, including after a presentation has been received. The stored result stays available until the retention date.
- **status**: _String_ - The current status of the verification session. Possible values:
  - `"UNKNOWN"` — Session ended up in unknown flow (should be avoided)
  - `"ACTIVE"` — Session was created and is active (can be used)
  - `"UNUSED"` — Session was not used yet, but not expired (can be used)
  - `"IN_USE"` — AuthorizationRequest was requested by wallet
  - `"VALIDATING_RECEIVED_REQUEST"` — Checking if received presentation will be processed
  - `"PROCESSING_FLOW"` — Received presentation is being processed (validation + policy execution)
  - `"EXPIRED"` — Verification request expired without being utilized
  - `"SUCCESSFUL"` — Verification completed fully successfully (all validation & policies passed)
  - `"FAILED"` — Verification was unsuccessful (presentation validation or policies failed)
- **attempted**: _Boolean_ - Whether the wallet has attempted to respond to the verification request
- **reattemptable**: _Boolean_ - Whether the session keeps accepting presentations until it expires. `false` rejects further presentations and authorization-request fetches after the first success. A failed attempt can still be retried.
- **presentationId**: _String_ (optional) - Id of the latest accepted presentation attempt. Callbacks and SSE events for that attempt carry the same id, and the next accepted presentation replaces it. Absent until a presentation or wallet error is accepted.
- **policies**: _Object_ - The policies configured for this session:
  - **vp_policies**: _Object_ (optional) - Policies to run on presentations
  - **vc_policies**: _Array_ (optional) - Policies to run on credentials
  - **specific_vc_policies**: _Object_ (optional) - Policies to run on specific credential IDs
- **policy_results**: _Object_ (optional) - Detailed results for all policies applied to the verification (only present after presentation is received):
  - **vp_policies**: _Object_ - Results for presentation-level policies (audience check, nonce check, envelope signature), organized by credential ID. Structure: `{ "credential_id": { "policy_name": { ... } } }` When one query is answered with several presentations, each policy succeeds only if every presentation passed, keeps every failed presentation's errors, and adds `multiple_presentations` with `count` and `failed_indexes`. One presentation keeps its original result.
  - **vc_policies**: _Array_ - Results for credential-level policies (signature, expiry, schema, etc.). Each item contains `policy`, `success`, and `result`.
  - **specific_vc_policies**: _Object_ - Results for credential-specific policies
  - **overallSuccess**: _Boolean_ (computed) - Whether all policies passed
- **redirects**: _Object_ (optional) - Success and error redirect URIs if configured

**Note:**

Instead of polling the session status, you can use **callbacks** or **Server Sent Events (SSE)** to be notified when the verification completes. See [Callbacks & SSE](https://docs.walt.id/community-stack/verifier2/callback-and-sse.md) for details.

## Example 2: Requesting Multiple Credentials

You can request multiple credentials in a single verification session. The wallet will present all matching credentials, and policies will be applied to each one.

This example requests both an Identity and a Education credential.

**Option: CURL**

**Endpoint:** `POST /verification-session/create` | [API Reference](https://verifier2.portal.test.waltid.cloud/swagger/index.html#/Verification%20Session%20Management/post_verification_session_create)

##### Example Request

```bash
curl -X 'POST' \
  'http://localhost:7004/verification-session/create' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "flow_type": "cross_device",
  "core_flow": {
    "dcql_query": {
      "credentials": [
        {
          "id": "identity",
          "format": "dc+sd-jwt",
          "meta": {
            "vct_values": [
              "https://issuer.demo.walt.id/draft13/identity_credential"
            ]
          }
        },
        {
          "id": "education",
          "format": "dc+sd-jwt",
          "meta": {
            "vct_values": [
              "https://issuer.demo.walt.id/draft13/educational_credential"
            ]
          }
        }
      ]
    },
    "policies": {
      "vc_policies": [
        {
          "policy": "signature"
        }
      ]
    }
  }
}'
```

The wallet will present both credentials (if available), and the signature policy will be applied to each one. The `policyResults` in the session info response will contain separate results for each credential using their `id` values.

## Understanding Flow Types and Core Concepts

Now that you've seen verification in action, let's understand the underlying structure.

### Verification Session Structure

A `VerificationSession` defines the full lifecycle: authorization request → user presentation → policy validation → final result.

Every verification request follows this structure:

```json
{
  "flow_type": "cross_device | same_device | dc_api",
  "core_flow": { /* common to all flows */ },
  "url_config": { /* specific to cross_device and same_device */ },
  "redirects": { /* optional */ }
}
```

**Why this structure?**

- **flow_type** determines how the credential request is delivered (QR code vs deep link vs browser API)
- **core_flow** contains the credential query and policies (same regardless of delivery method)
- **url_config** and **redirects** are flow-specific attributes

This separation makes it easy to switch between flows without changing your credential requirements.

### Flow Type Comparison

| Flow Type | Use Case | Required Attributes | User Experience |
|-----------|----------|---------------------|-----------------|
| `cross_device` | User scans QR code from desktop | None beyond core flow | Desktop shows QR → User scans with phone → Phone wallet opens |
| `same_device` | User clicks link on mobile | `redirects` (success/error URLs) | Browser redirects to wallet → Wallet opens → User returns to browser |
| `dc_api` | Browser-native credential exchange | `expectedOrigins` (array of allowed origins) | Browser shows native credential picker → User selects → Instant return |

## Configuration Defaults

Many session parameters can be configured globally in `verifier-service.conf` and overridden per-request when needed.

| Parameter | Config File Location | Request Override Path | When to Override |
|-----------|---------------------|----------------------|------------------|
| `urlPrefix` | `verifier-service.conf` → `urlPrefix` | `url_config.url_prefix` | Testing with ngrok, different environments per session |
| `urlHost` | `verifier-service.conf` → `urlHost` | `url_config.url_host` | Custom authorization endpoints, conformance testing |
| `clientId` | `verifier-service.conf` → `clientId` | `core_flow.clientId` | Different verifier identities per use case |
| `clientMetadata` | `verifier-service.conf` → `clientMetadata` | `core_flow.client_metadata` | Session-specific branding, multi-tenant scenarios |
| Signing key | `verifier-service.conf` → `key` | `core_flow.key` | Different signing keys per session (advanced) |
| Certificate chain | `verifier-service.conf` → `x5c` | `core_flow.x5c` | Different certificate chains per session (x509 flows) |

**Note:**

**Best Practice:** Set defaults in `verifier-service.conf` for your primary use case, and override per-request only when necessary. This keeps your API calls clean and reduces duplication.

See [Verifier Service Configuration](https://docs.walt.id/community-stack/verifier2/configurations/config-files/verifier-service.md) for detailed configuration documentation.

## Advanced Options

### Requesting Specific Claims

SD-JWT VCs support selective disclosure. You can request specific claims using the `claims` array:

```json
{
  "flow_type": "cross_device",
  "core_flow": {
    "dcql_query": {
      "credentials": [
        {
          "id": "credential_1",
          "format": "dc+sd-jwt",
          "meta": {
            "vct_values": [
              "https://issuer.demo.walt.id/draft13/identity_credential"
            ]
          },
          "claims": [
            {
              "path": ["given_name"]
            },
            {
              "path": ["family_name"]
            },
            {
              "path": ["address", "street_address"]
            }
          ]
        }
      ]
    }
  }
}
```

This requests only `given_name`, `family_name`, and `address.street_address` from the identity credential. The user's wallet will only disclose these specific claims.

### Custom Policies

Override default validation policies:

```json
{
  "flow_type": "cross_device",
  "core_flow": {
    "dcql_query": { /* ... */ },
    "policies": {
      "vc_policies": [
        {
          "policy": "signature"
        },
        {
          "policy": "expired"
        },
        {
          "policy": "not-before"
        }
      ]
    }
  }
}
```

See [Policies overview](https://docs.walt.id/community-stack/verifier2/policies/overview.md) for all available policies.

### Transaction Data Authorization

Verifier2 supports OpenID4VP `transaction_data` to bind credential presentations to specific transactions (e.g., payment authorization, account access).

For SD-JWT VC credentials, the wallet signs the requested transaction data hashes in the KB-JWT, and the verifier evaluates the `dc+sd-jwt/transaction-data-hash-check` policy automatically to validate the binding.

#### Example Request

```json
{
  "flow_type": "cross_device",
  "core_flow": {
    "dcql_query": {
      "credentials": [
        {
          "id": "pid",
          "format": "dc+sd-jwt",
          "meta": {
            "vct_values": [
              "https://issuer.demo.walt.id/draft13/identity_credential"
            ]
          },
          "claims": [
            { "path": ["given_name"] },
            { "path": ["family_name"] }
          ]
        }
      ]
    }
  },
  "openid": {
    "transactionData": [
      {
        "type": "org.waltid.transaction-data.payment-authorization",
        "credential_ids": ["pid"],
        "require_cryptographic_holder_binding": true,
        "transaction_data_hashes_alg": ["sha-256"],
        "amount": "42.00",
        "currency": "EUR",
        "payee": "ACME Corp"
      }
    ]
  }
}
```

#### Parameters

- **type**: _String_ (required) - The transaction data type identifier. The verifier accepts custom types without an allowlist; the wallet's configured registry still applies. Discover the configured types via [`transaction-data-profiles`](https://docs.walt.id/community-stack/verifier2/configurations/config-files/transaction-data-profiles.md). Common types:
  - `"org.waltid.transaction-data.payment-authorization"` — For payment transactions (fields: `amount`, `currency`, `payee`)
  - `"org.waltid.transaction-data.account-access"` — For account access requests (fields: `account_identifier`, `access_scope`)
  - `"urn:eudi:sca:payment:1"` — TS12 payment with a validated nested `payload`.
  
- **credential_ids**: _Array of Strings_ (required) - References one or more credential IDs from your DCQL query (`credentials[].id`). The wallet will bind this transaction data to presentations of these credentials.

- **require_cryptographic_holder_binding**: _Boolean_ (optional) - If provided, it must be set to `true`. Transaction data requires cryptographic holder binding (KB-JWT for SD-JWT VC, DeviceAuth for mDL). Requests with `false` are rejected per [OpenID4VP §B.3.3](https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#appendix-B.3.3).

- **transaction_data_hashes_alg**: _Array of Strings_ (optional) — Hash algorithms the wallet uses to bind transaction data. e.g. `["sha-256"]`. If omitted "sha-256" is used.

**Type-Specific Parameters:**

For `"org.waltid.transaction-data.payment-authorization"`:
- **amount**: _String_ (required) - Payment amount (e.g., `"42.00"`)
- **currency**: _String_ (required) - Currency code (e.g., `"EUR"`, `"USD"`)
- **payee**: _String_ (required) - Payee identifier (e.g., `"ACME Corp"`)

For `"org.waltid.transaction-data.account-access"`:
- **account_identifier**: _String_ (required) - Account identifier (e.g., account number, user ID)
- **access_scope**: _String_ (required) - Scope of access being requested (e.g., `"read"`, `"write"`, `"admin"`)

For `"urn:eudi:sca:payment:1"`, put all payment fields inside `payload`. For example,
replace the transaction entry above with this recurring payment and use a payment credential's
VCT in the DCQL query. Remove the example's identity-specific `claims` when changing its VCT:

```json
{
  "type": "urn:eudi:sca:payment:1",
  "credential_ids": ["pid"],
  "payload": {
    "transaction_id": "subscription-001",
    "payee": { "name": "ACME Corp", "id": "merchant-001" },
    "currency": "EUR",
    "amount": 11.56,
    "recurrence": { "frequency": "MNTH", "number": 12 }
  }
}
```

For a scheduled payment, replace `recurrence` with `execution_date` set to a future date-time
with an offset, such as `"2099-01-01T12:00:00Z"`. Omitting both means immediate execution for
customer-initiated payments or unknown timing for merchant-initiated payments. Invalid TS12
payloads return HTTP 400 before a session is stored, including transaction IDs longer than
36 Unicode characters. The wallet checks execution time again during submission, after signing and before releasing the complete response.

Use the guided payment form when discovery advertises `payloadSchema`, or keep JSON editing.
Both preserve exact numeric tokens; API clients must also avoid floating-point parsing of
amounts such as `9007199254740993.01`. See the [TS12 payment contract](https://docs.walt.id/community-stack/verifier2/configurations/config-files/transaction-data-profiles.md#ts12-payment-payload)
for optional fields, currency precision, rejected shapes, consent languages and app review behavior.

**Note:**

**Encoding Behavior:** You pass transaction data entries as plain JSON objects in your verification request. The verifier service automatically base64url-encodes each entry before placing it in the authorization request sent to the wallet. Do not base64-encode the entries yourself.

#### Constraints

- `transaction_data` requires a `dcql_query`. Requests without one are rejected with `invalid_request`.
- Each entry's `credential_ids` must reference DCQL credential query ids declared in the same request.
- Each referenced credential query must use a transaction-data-capable format: `dc+sd-jwt` or `mso_mdoc`.
- Transaction data with `require_cryptographic_holder_binding: false` is rejected. See [OpenID4VP §B.3.3](https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#appendix-B.3.3).
- Transaction-data types are configurable via profiles (e.g. `payment-authorization`, `account-access`). Custom types can be added through the [`transaction-data-profiles` configuration](https://docs.walt.id/community-stack/verifier2/configurations/config-files/transaction-data-profiles.md), and the active profiles are exposed via `GET /transaction-data-profiles`.
- Available on `cross_device`, `same_device`, and `dc_api` (Annex D) flows via the `openid.transactionData` field.

**Note:**

**Automatic Policy Enforcement:** When `transactionData` is present, the verifier automatically adds the appropriate transaction-data hash-check policy (`dc+sd-jwt/transaction-data-hash-check` for SD-JWT, `mso_mdoc/transaction-data-hash-check` for mDL) to ensure the wallet properly binds the transaction data. This happens even if you specify custom `vp_policies`. Your custom policies are preserved; the hash-check policy is added on top.

#### Discovery & Configuration

Transaction data types are configurable via profiles. To see which transaction data types your verifier instance supports:

```bash
curl -X 'GET' \
  'http://localhost:7004/transaction-data-profiles' \
  -H 'accept: application/json'
```

Custom transaction data types can be added through the [`transaction-data-profiles` configuration](https://docs.walt.id/community-stack/verifier2/configurations/config-files/transaction-data-profiles.md).

### Signed Requests

Sign the authorization request JWT using a verifier signing key. This is required for:

- **HAIP profile** compliance
- **DC API Annex C** (ISO 18013-7) flows
- Wallets that authenticate the verifier (`x509_san_dns`, `x509_hash`, `decentralized_identifier`, `verifier_attestation`)

Enable by setting `signed_request: true` inside the `core_flow` object of the session creation body.

**Key Configuration Required:** Signed requests require a signing key (`key`) to be configured. You can either:
- Set the `key` parameter in the  [`verifier-service.conf`](https://docs.walt.id/community-stack/verifier2/configurations/config-files/verifier-service.md#key-optional) as a service-wide default
- Override or provide the `key` directly in the verification request body

**Certificate Chain (`x5c`) Required for:**
- X.509-based client authentication when using `x509_san_dns:` or `x509_hash:` as the `clientId` format
- Signed Annex C (ISO 18013-7) requests

The leaf must chain to the wallet's configured trust anchors. If KeyUsage is present it must include `digitalSignature`; if absent, RFC 5280 treats the key as unrestricted. If ExtendedKeyUsage is present it must include TLS `clientAuth` (`1.3.6.1.5.5.7.3.2`) or mdoc reader authentication (`1.0.18013.5.1.6`); if absent, EKU is unrestricted. Wallets fail closed when no X.509 trust anchors are configured. Include both extensions when issuing verifier Request Object leaves.

The `x5c` parameter can be configured the same way as `key` — as a service-wide default or per-session override.

### Encrypted Request Objects

Sign the Request Object and encrypt it to a key the wallet supplies. Use this when the request contains personal information, such as payment `transaction_data`. Set `encrypted_request: true` inside `core_flow`. It defaults to `false` and also signs the request.

Only a cross-device session can use it. Both authorization URLs then contain `client_id`, `request_uri`, and `request_uri_method=post`. They do not embed the Request Object, and GET retrieval is rejected.

The wallet POSTs `wallet_metadata` with an inline encryption JWKS and `wallet_nonce` over HTTPS. The JWKS key must be usable for `ECDH-ES`. The `request_object_encryption_alg_values_supported` and `request_object_encryption_enc_values_supported` lists are optional. When present, they must permit `ECDH-ES` and either `A128GCM` or `A256GCM`. When absent, Verifier2 uses its `ECDH-ES` / `A128GCM` request-encryption profile; OID4VP does not mandate this default.

Verifier2 returns a JWE (`cty: JWT`) with HTTP content type `application/oauth-authz-req+jwt`, wrapping the signed JWT, and echoes `wallet_nonce`. If no usable encryption key is present, the request fails instead of falling back to plaintext. Wallet2 rejects unsigned JSON and unsigned JWT responses to POST retrieval.

A signing key and a client identifier that permits signed requests are required. A `redirect_uri:` client identifier cannot be used.

`encrypted_response` is separate. It encrypts the wallet's presentation (`direct_post.jwt`) and does not encrypt the request.

DC API sessions cannot perform this POST key exchange. Creating one with `encrypted_request: true` is rejected.

### Encrypted Responses

The wallet can encrypt the VP token response. Enable by setting `encrypted_response: true` inside the `core_flow` object of the session creation body.

**Key Configuration Required:** Encrypted responses require a key (`key`) for decrypting the VP token response. Configure it via [`verifier-service.conf`](https://docs.walt.id/community-stack/verifier2/configurations/config-files/verifier-service.md#key-optional) or provide it in the verification request body.

## Next Steps

- **Apply custom policies** — See [Policies](https://docs.walt.id/community-stack/verifier2/policies/overview.md) for validation rules beyond signature verification
- **Set up notifications** — Use [Callbacks & SSE](https://docs.walt.id/community-stack/verifier2/callback-and-sse.md) instead of polling for session status
- **Verify other credential types** — Try [W3C VC](https://docs.walt.id/community-stack/verifier2/credential-verification/vc-oid4vp.md) or [mDL](https://docs.walt.id/community-stack/verifier2/credential-verification/mdl-oid4vp.md)
- **Use DC API** — Try the [Digital Credentials API](https://docs.walt.id/community-stack/verifier2/credential-verification/dc-api.md) for browser-native credential exchange
