---
title: "mdoc Verification via OID4VP"
description: "Full sequence diagram for verifying an mdoc credential via OID4VP, from authorization request to verified presentation."
stack: "Community Stack (open source) — version 0.21.0"
stack_version: "0.21.0"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/community-stack/verifier/protocol-flows/mdoc-verification-oid4vp
generated: 2026-07-20
---
# mdoc Verification via OID4VP

This flow covers a portal initiating a verification session, the wallet scanning the QR code and presenting an mdoc credential, and the Verifier API validating it.

**Components involved:**
- Portal Application — initiates the verification session and displays the QR code
- Wallet (Holder) — scans the QR code, selects and presents the matching credential
- Verifier API — creates the authorization request, validates the presentation, and returns the result

```mermaid
sequenceDiagram
    participant Portal as Portal Application
    participant Wallet as Wallet<br/>(Holder)
    participant Verifier as Verifier API

    Portal->>Verifier: POST /openid4vc/verify
    activate Verifier

    Verifier->>Verifier: Create verification session<br/>and authorization request

    Verifier-->>Portal: 200 OK<br/>{authorizationUrl: "openid4vp://..."}
    deactivate Verifier

    Portal->>Portal: Generate QR code with<br/>authorization URL

    Portal-->>Wallet: Display QR code<br/>(openid4vp://...)

    Wallet->>Wallet: Scan QR code
    Wallet->>Wallet: Parse authorization request<br/>and match credentials

    Wallet->>Wallet: User selects mdoc<br/>to present

    Wallet->>Wallet: Generate DeviceResponse<br/>with mdoc credential

    Wallet->>Verifier: POST /openid4vc/verify/{state}
    activate Verifier

    Verifier->>Verifier: Parse DeviceResponse<br/>Extract mdoc document

    Verifier->>Verifier: Verify mdoc:<br/>- Issuer signature (x5Chain)<br/>- Device signature<br/>- Validity period<br/>- Session transcript

    Verifier->>Verifier: Extract credential claims<br/>from mdoc namespaces

    Verifier-->>Wallet: 200 OK
    deactivate Verifier
```

## Related

- [mDL Verification](https://docs.walt.id/community-stack/verifier/credential-verification/mdl-oid4vc.md)
- [Verification Policies](https://docs.walt.id/community-stack/verifier/credential-verification/policies/overview.md)
