---
# System prepended metadata

title: WIP Runbook for Generating a Verifiable Credential
tags: [VC, runbook, wip]

---

# Runbook for Generating a Verifiable Credential
### Step 1: Prepare the Credential Data
#### 1.1. Collect Data: Ensure the data record is complete and accurate.
#### 1.2. Format Claims: Format the data record into a JSON object that will be the credentialSubject in the VC.

### Step 2: Create the Credential Payload
#### 2.1. Define Credential Metadata: Add metadata such as issuanceDate, type, and credentialStatus.
#### 2.2. Include Subject DID: Add the subject's DID to the credentialSubject.
#### 2.3. Construct Payload: Assemble the complete payload with the issuer DID, subject DID, claims, and metadata.

### Step 3: Sign the Credential
#### 3.1. Choose Signing Algorithm: Select an appropriate cryptographic algorithm for the digital signature.
#### 3.2. Access Private Key: Securely retrieve the issuer's private key.
#### 3.3. Sign Data: Use the chosen algorithm and private key to sign the payload.
#### 3.4. Create JWS: Encode the header and payload, and append the signature to create a JWS.

### Step 4: Create the Verifiable Credential
#### 4.1. Assemble VC: Combine the payload and JWS to form the verifiable credential.
#### 4.2. Format VC: Ensure the VC is in the correct JSON-LD format as per the VC Data Model.

### Step 5: Test and Verify the Credential
#### 5.1. Self-Test: Attempt to verify the credential using the issuer's public key to ensure the signature is valid.
#### 5.2. External Verification: Optionally, have an external party test the verifiability of the credential.

### Step 6: Issue the Credential
#### 6.1. Deliver VC: Send the verifiable credential to the subject or make it available for them to retrieve.
#### 6.2. Record Issuance: Log the issuance of the VC for record-keeping and potential auditing.

### Step 7: Maintain the Credential
#### 7.1. Monitor Status: Ensure the validity of the credential over time, and manage any status changes such as revocation.
#### 7.2. Update as Needed: If the subject’s information changes, update and re-issue the VC as necessary.