light-mode-image
Learn
Credential offer

How to create an OID4VCI credential offer

To issue a credential via the OID4VCI workflow you must create a Credential offer. This offer specifies the Credential configurations that will be used to issue the credential, as well as additional parameters to support the issuance workflow.

Once the offer is created, it must be shared with the credential's intended holder so that they can claim the credential.

The process is similar for both the Authorization Code flow and the Pre-authorized Code flow. The main difference is the type of credential offer you need to create, depending on which workflow you are using.

Prerequisites

  • The id identifier of one or more Credential configurations you wish to include in this offer. This is obtained when you create a Credential configuration.
  • DIDs (Only required when sharing the offer as a DID message):
    • Issuer DID: This is a did:web that identifies the issuer who attests the claims in the credential are accurate.
    • Subject DID: This is a did:key that identifies the intended holder of the credential. This DID is usually retrieved from the intended holder's digital wallet.
      • In production environments you must have a secure way to obtain the holder's digital wallet DID:
        • Use DID Auth for any new interactions.
        • Ask the user to share their wallet DID.
        • Request an existing credential as part of a verification workflow, and extract the DID from that interaction.

Overview

The OID4VCI credential offer lifecycle comprises the following steps:

  1. Generate an offer URI.
  2. Send an offer URI.
  3. Accept a Credential offer.

Generate an offer URI

Generate the offer URI by making one of the following requests based on the issuance flow you are using:

  1. In the navigation panel on the left-hand side, expand the Credential Issuance menu.
  2. Select Credential offer.
  3. Select the Select button.
  4. Check the checkbox next to the credential configuration you wish to include in the credential offer.
  5. Select the Apply button.
  6. Select the Generate button.
  7. Download the generated QR code by selecting the Download button.

Send an offer URI

Once a credential offer URI is generated, you can send it to the intended holder in one of the following methods:

  • Send via a QR code.
  • Send via a Deeplink.
  • Send via a DID message.

Refer to Claiming credential offers for more details on how to adjust the offer URI to use specific schemes and the resulting user experience.

You can use any of these methods regardless of the issuance flow you are using (Authorization Code or Pre-authorized Code).

A common way to allow a digital wallet user to claim a credential is to encode the offer URI into a QR code. You could even print out the QR code.

You can use a tool similar to the following to convert the URI to a QR code (make sure you use the Plain text option where available):

Once the QR code is created, you can send it to the intended holder via your preferred communication channel.

Best practices

  • Make sure the QR code is large enough in size to be resolvable by a phone camera; 200px square is generally sufficient.

Accept a Credential offer

Once the Credential offer is shared with the intended holder, it is up to them to use their digital wallet to accept the offer and claim the credential.

The credential is only issued after the intended holder accepts the Credential offer.

How would you rate this page?

Last updated on

On this page