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
ididentifier 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:webthat identifies the issuer who attests the claims in the credential are accurate. - Subject DID: This is a
did:keythat 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.
- In production environments you must have a secure way to obtain the holder's digital
wallet DID:
- Issuer DID: This is a
Overview
The OID4VCI credential offer lifecycle comprises the following steps:
Generate an offer URI
Generate the offer URI by making one of the following requests based on the issuance flow you are using:
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):
-
https://www.qr-code-generator.com/
MATTR is not affiliated with any of these service providers and cannot vouch for their offerings.
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