OpenID4VCI - Issue Credential (Deferred)
In many real-life situations, a credential isn't immediately available when requested, often due to time-consuming business processes happening in the back office. In these cases, deferred issuance is used. Here's how credentials are issued on a deferred basis using OpenID for Verifiable Credentials Issuance (OID4VCI). The process involves the following key stages:
Create Credential Definition: This stage consists of two main sub-steps:
- Define: The credential parameters and rules are established.
- Prepare: All necessary information and infrastructure are set up for issuing the credential.
Deferred Issue: Once the credential definition is created and prepared, the issuance is deferred, allowing for any pending business processes to be completed. The credential will be issued only after authorisation or pre-authorisation is completed (optionally protected by a transaction code, the PIN).
Issue Credentials: After the authorisation step, the credentials can be issued to the holder. At this stage, it's necessary to configure the holder's wallet endpoint to complete the credential transfer.

The image illustrates this deferred process, where the issuance of the credential happens after a delay, once the back-end processes and authorisation steps have been successfully completed.
Step 1: Get the API Key (Issuer Admin)
To obtain your API key, sign in to the dashboard and go to Account > Developer APIs > Create API Key (see Get API Keys). Once you have your API key, enter it in the field below and click the Set API Key button to save it for future use.
x509 key of your organisation: a key with a certificate chain. After you set the API key, the page fills in such a key. To choose another key, click the key label next to a signing key field in a request, for example cryptographicKeyIdentifier. To create a key, attach a certificate or see your keys, follow the key management guide. To add your certificate to the NXD trust list, see trust list registration.Step 2: Create Credential Definition (Issuer Admin)
To create a credential definition, run 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. From the API response, copy the credentialDefinitionId for use in Step 3. Credentials can be issued in any of the following formats:
Request
Response
credentialDefinitionId can be reused to issue multiple credentials (Step 3).Step 3: Issue Credential (Issuer)
When you run Step 2 on this page, the credentialDefinitionId field below is autofilled automatically (and updated whenever Step 2 is re-run). If you are executing the APIs yourself, replace <credentialDefinitionId> with the ID obtained in Step 2. The issuer requests the issuance of a credential in the deferred mode, without the claims (credentials is optional in this mode): run the JSON code block below with the Run button. The call creates one issuance history for each credential configuration of the credential definition, all in one credential offer. Choose the credential format as needed. Alternatively, you may use the API available here. In that case, generate the QR code from offer.uri in the response (the credential offer URI) with a QR code generator tool, or paste the response into our tool here.
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.
Request
Response
From the API response, copy the credentialExchangeId of the issuance history (issuanceHistory[0].credentialExchangeId) for use in the next step. When you run Step 3 on this page, the credentialExchangeId path parameter in Step 4 is autofilled automatically (and updated whenever Step 3 is re-run). If the wallet requests the credential before the claims are available, the issuance history moves to the status credential_deferred, and the wallet receives a transaction ID to try again later.
Step 4: Provide the Claims and Receive Credential (Issuer/Holder)
When you run Step 3 on this page, the credentialExchangeId path parameter below is autofilled automatically (and updated whenever Step 3 is re-run). If you are executing the APIs yourself, use the credentialExchangeId from Step 3 as the path parameter. Once you have received the request and completed the necessary validations, send the claims of the issuance history with PUT /v4/config/ows/issuer/issuance-history/{credentialExchangeId}/claims by running the code block below with the Run button. The request body is {"claims": {...}}, with the claims in the same format as for in-time issuance. The response returns the issuance history with the status claims_supplied. The wallet then fetches the credential from the deferred credential endpoint, and the status changes to credential_issued. If the credential definition has more than one credential configuration, the Step 3 response contains one issuance history for each configuration, and you send the claims of each one in a separate call.
Alternatively, you can manually copy the code block and use the credentialExchangeId from Step 3 as the path parameter in the API request available here.
Request
Response
expiry_date, date_of_expiry or expiryDate). The API rejects claims whose expiry date has already passed, and if the date passes before the wallet sends its deferred credential request, the credential is not issued.Try It Yourself (With Demo Video)
Watch the below demo to learn issue credential API and try it out yourselves:
IETF SD-JWT VC and W3C VC (JWT) Credential Formats
Deferred Credential Issuance Demo: Learn how to issue credentials in deferred mode using OpenID4VCI protocol with iGrant.io Digital Wallets.