Credential Issuer Example
An example of how to operate a Verifiable Credential Issuer.
Overview
This example demonstrates an ACK-ID and ACK-Pay Verifiable Credential issuer API built with Hono.
The API supports issuing, verifying, and revoking two primary credential types:
ControllerCredential
: proves ownership of DIDs (part of ACK-ID).PaymentReceiptCredential
: provides proof of payment meeting a Payment Request (part of ACK-Pay).
The issuer implements credential revocation using StatusList2021, a privacy-preserving and efficient revocation list method.
Installation and Setup
Install dependencies and prepare your environment.
From within the issuer example directory (e.g., from project root: ./examples/issuer
) execute the setup:
Running the Server
Start the API server locally:
The server runs at: http://localhost:3456
API Endpoints
Authentication
All endpoints require a signed payload (JWT) proving DID ownership. During local development, include the X-Payload-Issuer
header with a resolvable DID-URI to bypass signature verification.
Response Format
All API responses use this JSON structure:
or
Controller Credential Endpoints
POST /credentials/controller
Issue a ControllerCredential proving DID control.
Sample cURL:
GET /credentials/controller/:id
Retrieve a ControllerCredential by ID.
Sample cURL:
DELETE /credentials/controller
Revoke a ControllerCredential by ID.
Sample cURL:
Payment Receipt Endpoints
POST /credentials/receipts
Issue a PaymentReceiptCredential.
Sample cURL:
GET /credentials/receipts/:id
Retrieve a PaymentReceiptCredential by ID.
Sample cURL:
DELETE /credentials/receipts
Revoke a PaymentReceiptCredential by ID.
Sample cURL:
Status List Endpoint
GET /status/:listId
Retrieve StatusList2021 credential for revocation checks.
Sample cURL:
DID Document Endpoint
GET /.well-known/did.json
Retrieve the issuer’s DID Document.
Sample cURL: