Create credential offer
POST/v2/config/digital-wallet/openid/sdjwt/credential-offer
Creates an OID4VCI Credential Offer that can be presented to a holder via QR code or deep link. OpenID4VCI 1.0 offers are not yet supported on this operation - the service refuses version_01 with a 400 - so use draft_13 until the backend adds 1.0 support. The wallet builds a Credential Offer by value with the Authorization Code Flow. The mandatory fields depend on the version of the OID4VCI specification. Version draft_13 needs credentialConfigurationIds. Version draft_17 needs scope, and does not accept credentialConfigurationIds. The offer always uses the Authorization Code Flow with an empty issuer_state. This operation does not create a Pre-Authorized Code Flow offer and does not add a tx_code.
Request
- application/json
Body
required
Credential issuer and the credentials that the offer must contain.
Credential Issuer Identifier that the offer points to. The holder uses this URL to read the Credential Issuer Metadata.
Possible values: [draft_13, draft_17]
Default value: draft_13
Version of the OID4VCI draft specification that the offer follows. The default is draft_13. OpenID4VCI 1.0 offers are not yet supported on this operation - the service refuses version_01 with a 400 - so use draft_13 until the backend adds 1.0 support.
Identifiers of the credential configurations that the offer contains. Use this field with version draft_13. Version draft_17 does not accept this field.
Scope that selects the credential configurations for the offer. Use this field with version draft_17. The wallet finds every credential definition of the organisation that has this scope.
Responses
- 200
- 400
- 401
- 500
The wallet created the credential offer.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
Credential Offer URI that the holder opens. The wallet returns the offer by value in the credential_offer query parameter.
{
"credentialOffer": "openid-credential-offer://?credential_offer=%7B%22credential_issuer%22%3A%22https%3A%2F%2Fdemo-api.igrant.io%2Fv2%2Forganisation%2F62e29d4c1d75a55b4ecd0e50%2Fservice%22%2C%22credential_configuration_ids%22%3A%5B%22PhotoIdCredential%22%5D%2C%22grants%22%3A%7B%22authorization_code%22%3A%7B%22issuer_state%22%3A%22%22%7D%7D%7D"
}
The organisation is not valid, the version is not supported, or a field that the version needs is missing. Holder operations are also not available for a sandbox organisation.
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
Unauthorized
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}
Internal server error
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
{
"errorCode": 400,
"errorDescription": "Bad input parameter"
}