From persona-pack
Retrieves and interprets Persona verification results for government IDs, selfies, and database checks from inquiries, including status, extracted data, and check outcomes.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin persona-packThis skill is limited to using the following tools:
Work with Persona's verification types: government ID (passport, driver's license), selfie liveness detection, and database checks (SSN, watchlist). Covers retrieving verification details, interpreting check results, and handling edge cases.
Creates Persona identity verification inquiries using Python REST API calls, generates hosted/embedded URLs, polls status, and retrieves results. For API testing and basic flows.
Executes full KYC customer onboarding with mandatory Step 0 independent verification (5+1 searches), 17 stagegates, four-factor risk scoring, Excel dashboard, PDF report, and audit trail for UK/EU/US/MENA compliance.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Share bugs, ideas, or general feedback.
Work with Persona's verification types: government ID (passport, driver's license), selfie liveness detection, and database checks (SSN, watchlist). Covers retrieving verification details, interpreting check results, and handling edge cases.
persona-core-workflow-a (inquiry flow)import os, requests
HEADERS = {
"Authorization": f"Bearer {os.environ['PERSONA_API_KEY']}",
"Persona-Version": "2023-01-05",
}
BASE = "https://withpersona.com/api/v1"
# Get all verifications for an inquiry
resp = requests.get(f"{BASE}/inquiries/inq_XXXXX", headers=HEADERS)
resp.raise_for_status()
inquiry = resp.json()["data"]
verifications = inquiry["relationships"]["verifications"]["data"]
for v in verifications:
v_resp = requests.get(f"{BASE}/verifications/{v['id']}", headers=HEADERS)
v_data = v_resp.json()["data"]["attributes"]
print(f" Type: {v['type']}")
print(f" Status: {v_data['status']}") # passed, failed, requires_retry
print(f" Checks: {v_data.get('checks', [])}")
# Government ID verification includes extracted data
def get_gov_id_details(verification_id: str) -> dict:
resp = requests.get(f"{BASE}/verifications/{verification_id}", headers=HEADERS)
resp.raise_for_status()
attrs = resp.json()["data"]["attributes"]
return {
"status": attrs["status"],
"first_name": attrs.get("name-first"),
"last_name": attrs.get("name-last"),
"dob": attrs.get("birthdate"),
"id_number": attrs.get("identification-number"),
"id_class": attrs.get("id-class"), # dl, pp, id
"country": attrs.get("country-code"),
"expiry": attrs.get("expiration-date"),
"checks": {
check["name"]: check["status"]
for check in attrs.get("checks", [])
},
}
# Example checks: id_barcode_detection, id_integrity, id_selfie_comparison
def get_selfie_result(verification_id: str) -> dict:
resp = requests.get(f"{BASE}/verifications/{verification_id}", headers=HEADERS)
attrs = resp.json()["data"]["attributes"]
return {
"status": attrs["status"],
"center_photo_url": attrs.get("center-photo-url"),
"checks": {
check["name"]: check["status"]
for check in attrs.get("checks", [])
},
# Key checks: selfie_pose_detection, selfie_liveness_detection
}
def get_database_check(verification_id: str) -> dict:
resp = requests.get(f"{BASE}/verifications/{verification_id}", headers=HEADERS)
attrs = resp.json()["data"]["attributes"]
return {
"status": attrs["status"],
"checks": {
check["name"]: {
"status": check["status"],
"reasons": check.get("reasons", []),
}
for check in attrs.get("checks", [])
},
# Key checks: database_ssn_check, database_watchlist_check
}
def make_verification_decision(inquiry_id: str) -> str:
resp = requests.get(f"{BASE}/inquiries/{inquiry_id}", headers=HEADERS)
verifications = resp.json()["data"]["relationships"]["verifications"]["data"]
all_passed = True
for v in verifications:
v_resp = requests.get(f"{BASE}/verifications/{v['id']}", headers=HEADERS)
status = v_resp.json()["data"]["attributes"]["status"]
if status != "passed":
all_passed = False
print(f" FAILED: {v['type']} — {status}")
return "approved" if all_passed else "manual_review"
| Verification Status | Meaning | Action |
|---|---|---|
passed | All checks passed | Approve user |
failed | One or more checks failed | Decline or manual review |
requires_retry | Poor image quality | Ask user to retry |
initiated | Check still running | Poll again |
persona-webhooks-eventspersona-common-errors