---
id: openID4vci-issue-dynamic-credential-request
title: OpenID4VCI - Dynamic Credential Request
description: Explore how OpenID4VCI enables dynamic credential requests, ensuring secure issuance and verification of verifiable credentials across digital identity systems.
keywords: [OpenID4VCI, dynamic credential request, OID4VCI, verifiable credentials, Organisation Wallet, European Business Wallet, EUDI Wallet, credential issuance]
hide_title: false
sidebar_label: Dynamic Credential Request
slug: /openID4vci-issue-dynamic-credential-request/
---

> **Build this with an AI coding agent.** Install the iGrant.io Agent Skills, then ask your agent to build the integration:
>
> ```bash
> npx skills add L3-iGrant/skills
> ```


import Link from '@docusaurus/Link';
import VideoPlayer from '@site/src/components/VideoPlayer';
import NoteBox from '@site/src/components/NoteBox';

OpenID4VCI based Dynamic Credential Request enable an organisation to request additional proof before issuing a credential. The following steps outline the process for issuing credentials with a dynamic credential request using OpenID for Verifiable Credentials Issuance (OID4VCI). This process is based on [Chapter 5.1.5 of the approved OID4VCI specification](https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-ID1.html#section-5.1.5), and is as illustrated below:

![Issue credential - DCR](./images/ow-dynamic-credential-request.png)

**Example workflow scenario**: The Companies Registration Office is issuing a Certificate of Registration to a company. To proceed, the company must provide a Legal Person Identification Data (LPID) credential for verification.

### Prerequisite

The company must have an LPID SD-JWT credential in their wallet. Follow the workflow guide available [here](/docs/openID4vci-issue-credential-intime/) to obtain the LPID credential.

### Step 1: Get the API Key (Issuer Admin)

To obtain your API key, please contact [support@igrant.io](mailto:support@igrant.io?subject=Request%20API%20Key). Once you have received your API key, enter it in the field below and click the **Set API Key** button to save it for future use.

import { ApiKeyManager } from '@site/src/components/ApiKeyManager';

<ApiKeyManager />

### Step 2: Create a Presentation Definition (Issuer)

The Companies Registration Office creates a presentation definition to specify the verification requirements. Execute the code block below using the **Run** button. Alternatively, you can manually copy the code block and use it in the body of the API request available [here](/docs/openid4vc-api/config-digital-wallet-open-id-presentation-definition). From the API response, copy the `presentationDefinitionId` for use in Step 4.

import Step2 from '@site/src/components/DynamicCredentialRequest/Step2';

<Step2
  versionFamily="createPresentationDefinition"
  initialVersionKey="version_01"
  initialFormatKey="w3c_jwt"
/>

<NoteBox title="Tip:" variant="tip">
Once a presentation definition is created, the <code>presentationDefinitionId</code> can be reused to issue multiple credentials (Step 4).
</NoteBox>

### Step 3: Create a Credential Definition (Issuer)

The Companies Registration Office defines the structure of the Certificate of Registration. Execute the code block below using the **Run** button. Alternatively, you can manually copy the code block and use it in the body of the API request available [here](/docs/openid4vc-api/config-create-digital-wallet-open-id-credential-definition). From the API response, copy the `credentialDefinitionId` for use in Step 4. Credentials can be issued in any of the following formats: 
1. [W3C Verifiable Credentials Data Model - JWT](https://www.w3.org/TR/vc-data-model/)
2. [IETF SD-JWT](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-selective-disclosure-jwt) 
3. [ISO/IEC 18013-5:2021 mdoc/mDL](https://www.iso.org/standard/69084.html)

import Step3 from '@site/src/components/DynamicCredentialRequest/Step3';

<Step3
  versionFamily="createCredentialDefinition"
  initialVersionKey="version_01"
  initialFormatKey="w3c_jwt"
/>

<NoteBox title="Tip:" variant="tip">
Once a credential definition is created, the <code>credentialDefinitionId</code> can be reused to issue multiple credentials (Step 4).
</NoteBox>

### Step 4: Issue and Receive Credential (Issuer/Holder)

The Companies Registration Office proceeds to issue the Certificate of Registration immediately or **InTime**. Replace `<credentialDefinitionId>` and `<presentationDefinitionId>` with the actual IDs obtained in the previous steps. You can run the JSON code block below using the **Run** button. 

After receiving the response, toggle the button provided to dynamically generate a QR code. The EUDI Wallet/Holder can then accept the credential offer using the Data Wallet (or any other EU Digital Identity Wallet) by either scanning the QR code or directly accessing the credential offer on their mobile device, such as via a browser.

import Step4 from '@site/src/components/DynamicCredentialRequest/Step4';

<Step4
  versionFamily="issueCredential"
  initialVersionKey="version_01"
  initialFormatKey="w3c_jwt"
/>

<NoteBox title="Info:">
For deferred credential issuance, follow the guide <a href="/docs/openID4vci-issue-credential-deferred/">here</a>.
</NoteBox>

### Try It Yourself (With Demo Video)

Watch the below demo to learn issue credential API and try it out yourselves:

<VideoPlayer
  videoId="lForfQ3xWcQ"
  title="Dynamic Credential Request Demo"
  description="Learn how to implement dynamic credential requests using OpenID4VCI protocol with iGrant.io Digital Wallets."
  uploadDate="2024-01-01"
  duration="PT10M"
/>