v8

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-05730512.7 KB
OpenID4VCI Protocol

Create a credential offer

Create an OpenID4VCI (OpenID for Verifiable Credential Issuance) credential offer from one of your templates. You provide captured claim values, and Didit returns the claim URL, the wallet deep link, and the pre-authorized grant data. Send the returned transaction code to the holder through your own channel when the offer requires one.

post/v1/credential-offers

Request body

template_idstring uuid required

Send the UUID of the credential template you want to issue from.

Example request

{
  "claims": {
    "given_name": "Ada",
    "tier": "gold"
  },
  "template_id": "5588f83f-620b-4614-8ffa-933634a0b708"
}

Response

Didit created the credential offer and returned the claim links and grant data.

claim_urlstring uri

Send this web claim URL to the holder when you use Didit's hosted claim flow.

credential_issuerstring uri

Use this issuer identifier as the OpenID4VCI (OpenID for Verifiable Credential Issuance) credential issuer.

credential_offer_uristring uri

Encode this OpenID4VCI (OpenID for Verifiable Credential Issuance) credential-offer URI as a QR code or wallet deep link.

email_sentboolean

You receive true when Didit sent the claim email during offer creation.

expires_atstring date-time

You receive the timestamp when this offer expires.

offer_idstring uuid

Use this UUID to fetch, accept, or resend the credential offer.

pre_authorized_codestring

You receive the pre-authorized code as a top-level convenience field.

recipient_emailstring

You receive the email recipient configured for the offer. You receive an empty string when no recipient email was set.

tx_codestring

Send this transaction code to the holder through an out-of-band channel.

Example response

{
  "claim_url": "http://localhost:3012/claim?offer=f7219265-039a-4c72-b2bd-54432bf443b3",
  "credential_issuer": "http://localhost:8011/v1/issuers/docs-capture-6clew6",
  "credential_offer_uri": "openid-credential-offer://?credential_offer_uri=http%3A%2F%2Flocalhost%3A8011%2Fv1%2Fcredential-offers%2Ff7219265-039a-4c72-b2bd-54432bf443b3%2Foffer",
  "expires_at": "2026-07-02T23:43:33.649962+00:00",
  "grants": {
    "urn:ietf:params:oauth:grant-type:pre-authorized_code": {
      "pre-authorized_code": "<redacted>"
    }
  },
  "offer_id": "f7219265-039a-4c72-b2bd-54432bf443b3",
  "pre_authorized_code": "<redacted>",
  "tx_code": "<redacted>"
}