Skip to main content

Credential offers

Take a credential offer into the organisation wallet: give a transaction code or an authorisation code, get a deferred credential, and accept the credential.

Exchange authorisation code and receive credential

Completes the Authorization Code Flow of a credential offer or of a wallet-initiated issuance: the wallet exchanges the authorisation code for an access token at the issuer and receives the credentials. Call it after the authorisation server of the issuer redirects the user back with `code` and `state`, for the records in `credential_pending` that have an `authorisationRequest`. The wallet refuses a redirect whose `state` does not match the records, before any token request (RFC 6749 section 10.12).

Accept credential

Accepts a received credential: the record changes from `credential_acked` to `credential_accepted`, and the wallet sends the OpenID4VCI `credential_accepted` notification to the issuer when the issuer has a Notification Endpoint (OpenID4VCI 1.0 section 11). For a batch issuance the wallet accepts every copy and notifies the issuer once; a second accept of an accepted batch changes nothing. It sends the holder event `ows.holder.credential.accepted`. The request has no body. To decline a credential, delete it with [Delete credential](/docs/openid4vc-api/config-delete-digital-wallet-open-id-credential).

Read credential issuer metadata

Reads and checks the Credential Issuer Metadata of a credential issuer (OpenID4VCI 1.0 section 12.2), for example to choose the `credentialConfigurationIds` of a wallet-initiated [Receive credential](/docs/openid4vc-api/config-receive-digital-wallet-open-id-credential). Give the Credential Issuer Identifier, or the URL of its metadata document. The wallet reads the metadata at the `.well-known/openid-credential-issuer` location of that identifier and refuses it when its `credential_issuer` is not exactly that identifier. The answer has only the members of the metadata model of the wallet (no `signed_metadata`), with `null` for an optional member that the issuer left out. Each `display` object is as the issuer gives it (OpenID4VCI 1.0 section 12.2.4): the wallet adds no default value. `credential_configurations_supported` is as the issuer sent it.