Skip to main content

Webhooks

Webhooks are used to notify external systems of platform events in real-time. Each event is delivered via HTTP POST to the registered endpoint.

Real-Time Notifications

Webhook support is available for all important events such as credential issuance, connection establishment, and proof verification. Payload security is ensured with HMAC signature.

Webhook Architecture​

Events from SSI Agent are processed and delivered to external endpoints:

Supported Events​

EventDescriptionPayload
connection.createdNew connectionconnection_id, state
connection.activeConnection activeconnection_id
credential.issuedCredential issuedcredential_id, schema_id
credential.receivedCredential receivedcredential_id
credential.revokedCredential revokedcredential_id
proof.requestedProof requestedproof_id
proof.verifiedProof verifiedproof_id, verified

Webhook Configuration​

Event Payload Structure​

FieldTypeDescription
event_typestringEvent type
timestampISO8601Event time
payloadobjectEvent data
signaturestringHMAC signature
📄 Example Webhook Payload
credential.issued Event
{
"event_type": "credential.issued",
"timestamp": "2024-12-19T10:30:00Z",
"payload": {
"credential_id": "cred-abc-123",
"connection_id": "conn-xyz-789",
"schema_id": "diploma_schema:1.0",
"state": "issued",
"holder_label": "Holder Wallet"
},
"signature": "sha256=a1b2c3d4e5f6..."
}

Signature Verification:

webhook-verify.js
const crypto = require('crypto');
const expectedSig = 'sha256=' + crypto
.createHmac('sha256', WEBHOOK_SECRET)
.update(JSON.stringify(body))
.digest('hex');
const isValid = expectedSig === request.headers['x-signature'];

Security​

FeatureDescription
HMAC SignaturePayload integrity verification
HTTPSTLS encrypted transmission
Retry LogicFailed delivery retry
IP WhitelistSource IP filtering