A reference webhook implementation for integrating with EUDIPLO credential issuance flows.
This serves as both:
- A test server for development
- A reference implementation showing how to handle webhook callbacks
The webhook API is documented in OpenAPI format: webhook-api.yaml
You can view the interactive documentation using:
- Swagger Editor - paste the YAML content
- OpenAPI Preview VS Code Extension
Endpoint: POST /claims
Unified endpoint for resolving credential claims in all issuance flows:
- Authorization Code Flow: Receives
identityfield with token claims from AS - Presentation Flow: Receives
credentialsfield with disclosed credential claims
Endpoint: POST /notify
Called when the wallet notifies about credential status changes (credential_accepted, credential_failure, credential_deleted).
TypeScript type definitions are available in src/types.ts:
import {
ClaimsWebhookRequest,
NotificationWebhookRequest,
ClaimsWebhookResponse,
AuthorizationIdentity,
PresentedCredential,
// Type guards
isClaimsWebhookRequest,
hasIdentity,
hasCredentials,
// Helpers
createClaimsResponse,
createDeferredResponse,
} from './types';pnpm installpnpm startStarts a local server on port 8787.
pnpm run deploy| Endpoint | Description |
|---|---|
POST /claims |
Unified claims webhook (auth code + presentation flows) |
POST /notify |
Notification webhook |
POST /deferred-claims |
Returns deferred response |
POST /consume |
Authenticated webhook example (requires x-api-key: foo-bar) |