Receive credential
Takes a credential offer into the organisation wallet over OpenID4VCI 1.0, or starts a wallet-initiated issuance. The wallet reads the Credential Issuer Metadata, gets the token and asks for the credential with the holder key of the organisation (the request has no key field).
Send one of two bodies:
- Credential offer:
credentialOffer, the offer link (QR code) of the issuer. - Wallet-initiated issuance:
credentialIssuerandcredentialConfigurationIds. The wallet makes the offer itself and starts the Authorization Code Flow.
Then read credentialStatus of each record in the answer:
credential_acked: the wallet holds the credential. Accept or delete it.credential_pendingwithrequiresTransactionCodetrue: send the code with Receive credential with transaction code.credential_pendingwithauthorisationRequest: open that URL in the browser of the user, then send the code of the redirect to Exchange authorisation code.credential_pendingwithacceptanceToken: the issuer defers the credential. Call Receive deferred credential later.
Each new record makes a wallet notification and the holder event ows.holder.credential.created (pending) or ows.holder.credential.received.
The holder operations work for the main organisation only: a sandbox organisation has no holder wallet. Most of them also need an operational wallet unit (see Read wallet unit status).
Authorizations
AuthorizationstringheaderrequiredYour API key with the prefix
ApiKey:ApiKey <your-api-key>. Get an API key.Scope:
credentials:receive
Body
The credential offer, or the issuer and the credential configurations of a wallet-initiated issuance.
credentialOffer stringThe credential offer link of the issuer, with its
credential_offer_uri(offer by reference) orcredential_offer(offer by value) query parameter, for exampleopenid-credential-offer://?credential_offer_uri=.... A URL without one of these parameters gives HTTP 400. Leave outcredentialIssuerandcredentialConfigurationIdswhen you send it.Example:
"openid-credential-offer://?credential_offer_uri=https://demo-api.igrant.io/organisation/0f9b1c2d-3e4a-4b6c-8d8e-9f0a1b2c3d4e/service/credential-offer/6650d3c3-b8b1-4c2a-91f0-d9e4c7a2b5f8"credentialIssuer stringFor a wallet-initiated issuance: the Credential Issuer Identifier, or the URL of its
.well-known/openid-credential-issuermetadata. Thecredential_issuerof the metadata must be exactly this identifier.Example:
"https://demo-api.igrant.io/organisation/0f9b1c2d-3e4a-4b6c-8d8e-9f0a1b2c3d4e/service/version-01"credentialConfiguration Ids string[]For a wallet-initiated issuance: one or more keys of
credential_configurations_supportedof the issuer. Get them with Read credential issuer metadata.
Response
The credential records that the wallet made.
credentialobject or any[] | nullOne credential record, an array when the wallet made more than one record (for example an offer of several credential configurations), or
nullwhen it made none.