Skip to main content

Issue a Credential from your backend

Preconditions

Issue to Organization Wallet

Sequence Diagram Issue to Organization Wallet

  1. The end user initiates the credential issuance flow by sending a request to your backend.
  2. Your backend sends a request to your Credenco Organisation Wallet to issue a credential by calling the Start issue Credential API.
    In the request, you need to provide the Credential Issue Template Key, the credential attributes and the address of the organization wallet of the customer.
{
"correlation_id": "89cba89",
"template_id": "issue_iban",
"claims": {
"companyname": "CoolSoft B.V.",
"currency": "EUR",
"iban": "NL12TUL25708789078",
"bic": "TULINL2A",
"acccount_type": "Business Checking Account"
},
"request_uri_base": "https://customerwallet.com"
}
  1. The response of the Start issue Credential API call contains the credential request URI.
{
"correlation_id": "89cba89",
"request_uri": "https://customerwallet.com/?credential_offer_uri=https..",
"status_uri": "https://wallet.credenco.com/api/v2/issue/89cba89"
}
  1. The browser of the customer must be redirected to the request_uri.
  2. The Wallet of the customer is opened in the browser.
  3. The Wallet of the customer and your Credenco wallet will handle the credential issuance flow via the OpenID4vci protocol.
  4. After acceptance of the credential by the customer the customer wallet will hold the new Credential.
  5. Your backend can now use the Get issue status API to retrieve the status of the credential issuance process. in the response you will find the status and the revocation_uuid. With this uuid you can revoke the credential at a later time. (you need the have a statusList configured for revocation to work)
{
"status": "issue_request_created",
"correlation_id": "89cba89",
"revocation_uuid": "0e2c1f62-3392-462e-a25e-483fa0e2a3a3"
}



Issue to Personal Wallet

Sequence Diagram Issue to Personal Wallet

  1. The end user initiates the credential issuance flow by sending a request to your backend.
  2. Your backend sends a request to your Credenco Organisation Wallet to issue a credential by calling the Start issue Credential API.
    In the request, you need to provide the Credential Issue Template Key, the credential attributes and the size of the QR code to be generated by your Credenco wallet.
{
"correlation_id": "89cba89",
"template_id": "issue_iban",
"claims": {
"companyname": "CoolSoft B.V.",
"currency": "EUR",
"iban": "NL12TUL25708789078",
"bic": "TULINL2A",
"acccount_type": "Business Checking Account"
},
"qr_code": {"size": 400}
}
  1. The response of the Start issue Credential API call contains the Data URI of the QR code in PNG format.
{
"correlation_id": "89cba89",
"request_uri": "openid-credential-offer://?credential_offer_uri=..",
"status_uri": "https://wallet.credenco.com/api/v2/issue/89cba89",
"qr_uri": "data:image/png;base64,iVBORw0f....="
}
  1. The browser of the customer must sow the QR code in the UI of your application.
  2. The customer scans the QR code on his/her phone. The Personal Wallet App will open.
  3. The Personal Wallet App and your Credenco wallet will handle the credential issuance flow via the OpenID4vci protocol.
  4. After acceptance of the credential by the customer the Personal Wallet App will hold the new Credential.
  5. Your backend can now use the Get issue status API to retrieve the status of the credential issuance process. in the response you will find the status and the revocation_uuid. With this uuid you can revoke the credential at a later time. (you need the have a statusList configured for revocation to work)
{
"status": "issue_request_created",
"correlation_id": "89cba89",
"revocation_uuid": "0e2c1f62-3392-462e-a25e-483fa0e2a3a3"
}