Skip to content
OpenSmartRoute
Skillv1.0.0

persona-core-workflow-b

Work with Persona verification types: government ID, selfie, database checks. Use when implementing specific verification checks, reviewing verification results, or building custom verification workfl

by jeremylongshore(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from jeremylongshore/tons-of-skills-marketplace (skills/.curated/persona-core-workflow-b/SKILL.md). Install upstream with npx skills add jeremylongshore/tons-of-skills-marketplace --skill persona-core-workflow-b. Copyright stays with the author (MIT).

Persona Core Workflow B — Verification Checks

Overview

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.

Prerequisites

  • Completed persona-core-workflow-a (inquiry flow)
  • Inquiry Template with verification checks configured

Instructions

Step 1: List Verifications for an Inquiry

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', [])}")

Step 2: Government ID Verification Results

# 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

Step 3: Selfie Liveness Check

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
    }

Step 4: Database Verification (SSN, Watchlist)

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
    }

Step 5: Decision Logic

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"

Output

  • Verification results retrieved with extracted data
  • Government ID fields (name, DOB, ID number) parsed
  • Selfie liveness status checked
  • Database checks (SSN, watchlist) interpreted

Error Handling

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

Resources

Next Steps

  • Handle events via webhooks: persona-webhooks-events
  • Debug verification issues: persona-common-errors

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/jeremylongshore-tons-of-skills-marketplace-persona-core-58d70b/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

jeremylongshore-tons-of-skills-marketplace-persona-core-58d70b.ocm.jsonjson
{
  "ocm": "1",
  "id": "jeremylongshore-tons-of-skills-marketplace-persona-core-58d70b",
  "kind": "skill",
  "name": "persona-core-workflow-b",
  "description": "Work 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\".",
  "publisher": "jeremylongshore",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "saas",
      "persona",
      "verification",
      "government-id",
      "selfie",
      "kyc",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Work 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\"."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/jeremylongshore/tons-of-skills-marketplace",
      "path": "skills/.curated/persona-core-workflow-b/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/HEAD/skills/.curated/persona-core-workflow-b/SKILL.md",
      "key": "jeremylongshore/tons-of-skills-marketplace/skills/.curated/persona-core-workflow-b/SKILL.md"
    },
    "compatibility": "Designed for Claude Code",
    "allowed_tools": [
      "Read,",
      "Write,",
      "Edit,",
      "Bash(curl:*),",
      "Grep"
    ],
    "license": "MIT"
  },
  "instructions": "# Persona Core Workflow B — Verification Checks\n\n## Overview\n\nWork 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.\n\n## Prerequisites\n\n- Completed `persona-core-workflow-a` (inquiry flow)\n- Inquiry Template with verification checks configured\n\n## Instructions\n\n### Step 1: List Verifications for an Inquiry\n\n```python\nimport os, requests\n\nHEADERS = {\n    \"Authorization\": f\"Bearer {os.environ['PERSONA_API_KEY']}",
  "cost": {
    "context_tokens": 1197
  }
}

Fetch it by URL: GET /api/v1/registry/jeremylongshore-tons-of-skills-marketplace-persona-core-58d70b/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.