Webhooks

When a verification completes, Ad-Hoc Verify POSTs the results to a URL of your choosing in real time — no polling required.

When Webhooks Fire

A webhook is sent whenever a verification reaches a terminal state. There are two states that trigger delivery:

completed
The end user finished the full verification flow — license scan, liveness check, and face comparison. Results are final. This is the normal successful outcome.
manual_review
The face comparison was inconclusive and the end user submitted their images for human review. The webhook fires immediately, before any human reviews the case. The payload includes manual_review_requested: true in the verification object.

Verifications that expire without completion, or that are deleted, do not trigger a webhook.

i
If no webhook URL is configured on a verification or template, delivery is skipped entirely. Results are still available on the dashboard and via the GET /verification endpoint.

Payload Shape

The webhook is a POST request with Content-Type: application/json. The body always contains request_id and verification; the remaining fields are present only when they apply.

{ "request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "external_id": "PO12345", "verification": { "license_appears_real": true, "license_expired": false, "over_21": true, "over_18": true, "webcam_appears_live": true, "webcam_face_matches_license_photo": true, "face_match_score": "definite_match", "face_match_confidence": 0.84, "face_match_cosine_similarity": 0.91 }, "reasons": [], "license_data": { "first_names": "JOHN", "last_name": "DOE", "dob": "1990-01-15" }, "phone_verification": { "phone_areacode": "415", "last_3_digits": "789", "phone_verified": true, "line_type": "mobile", "lookup": { "phone_number": "+14155550789", "caller_name": "John Doe", "carrier_name": "T-Mobile" } } }

Core Fields

request_id
UUID of the verification — matches the id returned when you created the request
external_id
Your reference identifier, if you provided one when creating the verification. Omitted when not set.
verification
Core verification results — always present (see table below)
reasons
Always present. An array explaining every check that is not a clean pass, or an empty array when all checks passed. Use it to tell a result that points at fraud from one that simply could not be completed. See Reasons.
license_data
PII fields extracted from the license. Only the fields you requested are included. Empty object {} when no fields were requested. Always an encrypted envelope; personal data is never sent in plaintext.
phone_verification
Phone verification result. Present only when phone verification was enabled on the request.
address_verification
Address deliverability and name-match indicators. Present only when address verification was requested and could run. See Indicators.
location_consistency
Whether the end user's network location is consistent with their license address. Present only when the check was requested and could run. See Indicators.
license_photo
Cropped face image from the driver's license. Present only when include_license_photo was enabled. An encrypted envelope (the image is never sent in plaintext).
encryption
Encryption metadata (algorithm, wrapped key). Present whenever the payload carries encrypted personal data — needed to decrypt license_data, phone_verification.lookup, and license_photo.
encryption_key
Which of your public keys the data was encrypted with, so you know which private key to use. Present whenever the payload carries encrypted personal data. Contains name (the label you gave the key), fingerprint_ssh (SHA256:…, as printed by ssh-keygen -l) and fingerprint_sha256 (hex SHA-256 of the DER-encoded public key, as produced by openssl).

Verification Object

license_appears_real
Whether the scanned document appears to be a genuine ID (edge detection, proportions, face presence). false does not always mean a forged card: it is also what you get when neither the barcode nor the printed text could be read, or when no physical card could be confirmed. Check reasons for license_unreadable (nothing to check), license_data_mismatch (the barcode contradicts the front) or license_card_unconfirmed (no card established).
license_card_confirmed
Whether the image the selfie was compared against is confidently from a physical license: the issuing state or province, or the barcode's values, were read as printed text on the front, and the face is sized and placed like a card portrait. false means that could not be established, so a face match is not a good-faith match (for example a face held up to the camera in place of a card). When false, license_appears_real is also false. Absent on older results. See license_card_unconfirmed in reasons.
license_expired
true, false, or "undetermined". Whether the license expiration date has passed. "undetermined" means no expiration date could be read (the barcode was not decoded and the front of the card gave none), so it is not known either way.
over_21
true, false, or "undetermined". Whether the person is 21 or older based on the date of birth on the license. "undetermined" means no date of birth could be read, so it is not a finding that the person is under 21.
over_18
true, false, or "undetermined". Whether the person is 18 or older based on the date of birth on the license. "undetermined" means no date of birth could be read, so it is not a finding that the person is under 18.
document_type
"driver_license", "id_card", or "undetermined". Read from the title at the top of the card (for example "Driver License", "Operator License", "Driver Privilege Card" or "Permis de conduire" are driver_license; "Identification Card", "Non-Driver ID" or "State ID" are id_card). If the title cannot be read, the document type in the barcode is used. "undetermined" means neither said. Both types are accepted as valid ID; this field lets you tell them apart. May be absent on older results.
issuing_jurisdiction
Two-letter code of the US state, district, territory or Canadian province/territory that issued the card (for example "MA" or "ON"), read from the header of the card, or "undetermined". If the header cannot be read, the state in the barcode (the holder's address) is used. May be absent on older results.
webcam_appears_live
Whether the selfie passed liveness detection (blink + head movement challenges)
webcam_face_matches_license_photo
true, false, or "undetermined". "undetermined" means the match was inconclusive and manual review was requested. When the score is below likely_match, check reasons for why: the faces may simply not have been comparable.
face_match_score
Categorical result: definite_match, likely_match, possible_match, or no_match. See Face Match Scoring.
face_match_confidence
Numeric confidence score (0–1). Supplementary — use face_match_score for business logic.
face_match_cosine_similarity
Cosine similarity between the license and selfie embeddings (−1 to 1). Supplementary.
ip_found / is_proxy
Whether the submitting connection was found in IP intelligence data, and whether it came through a known proxy or anonymizing service. proxy_type and proxy_description are added when is_proxy is true. A proxy is not proof of fraud; see Data Fields & Indicators.
manual_review_requested
Present and true when the end user requested manual review after a failed face match.

Reasons

A false or low result is not always evidence against the person. A card can fail to scan, a photo can be too blurry to read a face from, or a barcode can fail to decode, and each of those would otherwise look the same as a fake ID or a minor. reasons separates the two. Each entry explains one or more checks:

"reasons": [ { "code": "dob_unavailable", "checks": ["over_18", "over_21"], "kind": "incomplete", "message": "The barcode on the back could not be decoded, and the date of birth could not be read from the front, so the age checks are undetermined. This does not mean the person is under age." } ]
code
Stable identifier you can branch on (see the table below)
checks
Which keys of verification the entry explains
kind
finding: evidence about the person or document (a mismatch, a failed comparison). incomplete: the check could not be completed, which says nothing about the person. info: context, such as a face match decided by a person during manual review.
message
A plain-language explanation. Written for people; do not parse it.
license_data_mismatch
finding · license_appears_real. The license number or last name on the barcode differs from the front of the card.
license_unreadable
incomplete · license_appears_real. Neither the barcode nor the printed text could be read, so there was nothing to check.
license_card_unconfirmed
finding · license_card_confirmed. The image used as the license photo could not be confirmed to be a physical license (no readable state or province, no barcode values found as printed text, or a face sized like a selfie).
face_match_card_unconfirmed
finding · webcam_face_matches_license_photo, face_match_score, license_card_confirmed. The selfie matched, but the image it matched could not be confirmed to come from a card. Treat the match as not established in good faith.
dob_unavailable
incomplete · over_18, over_21 (both "undetermined"). No date of birth could be read.
expiration_unavailable
incomplete · license_expired ("undetermined"). No expiration date could be read.
jurisdiction_mismatch
info · issuing_jurisdiction. The state or province at the top of the card differs from the one in the barcode. The barcode holds the holder's address, which can differ from the issuer.
document_type_mismatch
info · document_type. The front of the card and the barcode disagree on driver license versus ID card. The front reading is reported.
face_license_photo_unreadable
incomplete · webcam_face_matches_license_photo, face_match_score. A usable face could not be read from the license photo, so no comparison was made.
face_selfie_unusable
incomplete · the face checks. No usable face was captured from the selfie video.
face_possible_match
incomplete · the face checks. Both faces were read and the score landed on possible_match.
face_mismatch
finding · the face checks. Both faces were read and compared and were not similar enough.
face_reviewed_manually
info · the face checks. A person decided the face match during manual review; the automatic face reasons are replaced by this one.
liveness_incomplete
incomplete · webcam_appears_live. One or more live-person challenges were not completed.
i
New codes may be added over time, so treat an unrecognized code as an incomplete result unless its kind says otherwise. Results created before reasons was introduced do not include it through the API.

Custom Headers

You can attach arbitrary HTTP headers to webhook deliveries — useful for authenticating the request on your server so you know it's genuinely coming from Ad-Hoc Verify.

Configure headers when creating a template or an individual verification request. Headers are stored as a JSON object and sent with every delivery to that verification's webhook URL:

{ "webhook_url": "https://api.yourcompany.com/webhooks/verify", "webhook_headers": { "X-API-Key": "your-secret-key", "X-Source": "ad-hoc-verify" } }

On your server, validate the header value on every inbound webhook request before processing the payload. This is the primary mechanism for confirming the request originated from Ad-Hoc Verify.

!
Webhook headers are stored server-side and are never exposed to end users. Treat the values like passwords — rotate them if you believe they've been compromised.

Retry Logic

If your endpoint returns a non-2xx status code, or the request times out, Ad-Hoc Verify retries automatically:

Attempt
Delay
1 (initial)
Immediate
2
5 seconds after failure
3
15 seconds after failure

After 3 failed attempts the webhook_status is set to "failed". You can trigger a manual retry from the Requests page on the dashboard, or call the retry endpoint via API. Results are always retrievable via GET /verification regardless of webhook delivery status.

Security Recommendations

  • Use a secret header. Set a webhook_headers value like X-Webhook-Secret and validate it on every request.
  • Require HTTPS. All webhook URLs must use https://. Plaintext HTTP is not supported.
  • Respond quickly. Return a 2xx as soon as you receive the payload and process it asynchronously. Long-running responses risk timeouts and unnecessary retries.
  • Treat request_id as idempotent. Retries deliver the same payload. Check whether you've already processed a given request_id before acting on it.
  • Personal data arrives encrypted. E2E encryption is always on when PII is collected, so the payload arriving at your webhook cannot be read in transit or by intermediaries. Keep your passphrase or private key safe.

Ready to build? Head to the API reference for the full endpoint documentation.

API Reference →