---
title: "Prepare Credential"
method: POST
path: "/issuer/interactions/prepare-credential"
tags: ["issuer"]
---

# Prepare Credential

`POST /issuer/interactions/prepare-credential`

Used by VCS OIDC credential endpoint to request credential to conclude OIDC issuance flow.

## Request body

- PrepareCredential — Model for Prepare Credential request.
  - `types` string[], required — Array of types of the credential being issued.
  - `format` string — Format of the credential being issued.
  - `did` string — DID to which issued credential has to be bound.
  - `audienceClaim` string, required — The "aud" claim received from the client.
  - `requested_credential_response_encryption` RequestedCredentialResponseEncryption — Object containing requested information for encrypting the Credential Response.
    - `alg` string, required — JWE alg algorithm for encrypting the Credential Response.
    - `enc` string, required — JWE enc algorithm for encrypting the Credential Response.
  - `tx_id` string, required — Transaction ID.
  - `hashed_token` string, required — Hashed token received from the client.

## Response `200`

OK

- PrepareCredentialResult — Model for Prepare Credential response.
  - `credential` union, required — Credential value. According to draft 13 spec.
    - string
    - object
  - `format` string, required — Format of issued credential. Internal use only.
  - `oidc_format` string, required — OIDC credential format. Internal use only.
  - `credentials` CredentialResponseCredentialObject[], required — Contains an array of one or more issued Credentials. — unresolved $ref
  - `notification_id` string, required — String identifying an issued Credential that the Wallet includes in the acknowledgement request.
  - `retry` boolean, required — Boolean value indicating whether the Wallet should retry the issuance request. Internal Use. Used for deferred issuance.

## Other responses

- `400` — Bad request

---

[API](https://skmtc.net/trustbloc/apis/verifiable-credential-service-vcs.md) · [All operations](https://skmtc.net/trustbloc/apis/verifiable-credential-service-vcs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trustbloc/verifiable-credential-service-vcs/revisions/9e21ad997121/schema)
