/persona-pack:persona-webhooks-eventsfrom persona-pack
Handles Persona webhook events for identity verification, including HMAC signature verification and idempotent processing of inquiry.completed/approved/declined and verification.passed/failed events.
Ships in persona-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
HMAC signature verification, inquiry.completed/approved/declined events, idempotent processing.
persona-install-auth setup1. Dashboard > Settings > Webhooks > Add Webhook
2. URL: https://your-app.com/webhooks/persona
3. Events: inquiry.completed, inquiry.approved, inquiry.declined,
verification.passed, verification.failed
4. Copy the webhook secret for signature verification
import express from 'express';
import crypto from 'crypto';
const app = express();
app.post('/webhooks/persona',
express.raw({ type: 'application/json' }),
async (req, res) => {
const signature = req.headers['persona-signature'] as string;
const secret = process.env.PERSONA_WEBHOOK_SECRET!;
// Verify HMAC-SHA256 signature
const expectedSig = crypto
.createHmac('sha256', secret)
.update(req.body)
.digest('hex');
if (!crypto.timingSafeEqual(Buffer.from(signature || ''), Buffer.from(expectedSig))) {
return res.status(401).json({ error: 'Invalid signature' });
}
const event = JSON.parse(req.body.toString());
await handlePersonaEvent(event);
res.status(200).json({ received: true });
}
);
async function handlePersonaEvent(event: any) {
const { type, data } = event;
switch (type) {
case 'inquiry.completed':
const inquiryId = data.attributes.payload.data.id;
const referenceId = data.attributes.payload.data.attributes['reference-id'];
console.log(`Inquiry completed: ${inquiryId} for user ${referenceId}`);
// Update user KYC status in your database
await updateUserKycStatus(referenceId, 'completed');
break;
case 'inquiry.approved':
await updateUserKycStatus(data.attributes.payload.data.attributes['reference-id'], 'approved');
break;
case 'inquiry.declined':
await updateUserKycStatus(data.attributes.payload.data.attributes['reference-id'], 'declined');
break;
case 'verification.passed':
console.log(`Verification passed: ${data.attributes.payload.data.id}`);
break;
case 'verification.failed':
console.log(`Verification failed: ${data.attributes.payload.data.id}`);
break;
default:
console.log(`Unhandled event: ${type}`);
}
}
const processedEvents = new Set<string>();
async function idempotentHandle(event: any) {
const eventId = event.data.id;
if (processedEvents.has(eventId)) {
console.log(`Skipping duplicate: ${eventId}`);
return;
}
await handlePersonaEvent(event);
processedEvents.add(eventId);
}
| Issue | Cause | Solution |
|---|---|---|
| Invalid signature | Wrong webhook secret | Re-copy secret from Dashboard |
| Missing events | Events not selected | Check webhook configuration |
| Duplicate processing | Retry delivery | Use event ID deduplication |
For common errors, see persona-common-errors.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
18 skills in this plugin
/persona-ci-integrationCI/CD pipeline for Persona integrations with sandbox API testing.
Use when working with Persona identity verification.
Trigger with phrases like "persona ci-integration", "persona ci-integration".
/persona-common-errorsFix top Persona API errors: 401, 422, webhook signature failures, inquiry state issues.
Use when working with Persona identity verification.
Trigger with phrases like "persona common-errors", "persona common-errors".
/persona-core-workflow-aBuild a complete KYC verification flow with Persona inquiries and embedded UI.
Use when implementing identity verification, building KYC onboarding,
or integrating Persona's hosted flow into your application.
Trigger with phrases like "persona KYC flow", "identity verification",
"persona inquiry workflow", "onboarding verification".
/persona-core-workflow-bWork with Persona verification types: government ID, selfie, database checks.
Use when implementing specific verification checks, reviewing verification results,
or building custom verification workflows.
Trigger with phrases like "persona verification", "government ID check",
"selfie verification", "persona database check", "verification results".
/persona-cost-tuningOptimize Persona verification costs with template selection and caching.
Use when working with Persona identity verification.
Trigger with phrases like "persona cost-tuning", "persona cost-tuning".
/persona-debug-bundleCollect Persona diagnostic info: inquiry IDs, API responses, webhook logs.
Use when working with Persona identity verification.
Trigger with phrases like "persona debug-bundle", "persona debug-bundle".
npx claudepluginhub flight505/skill-forge --plugin persona-packOther plugins' skills for the same job