KYC
Identity verification checks, the issuance gate, and console attestation.
The KYC gate
Creating a cardholder does not itself clear them to hold a card. Under a
programme with KYC enabled, card issuance requires the cardholder's
kyc_complete field to be true — and it is once the cardholder has either
passed verification (kyc_state: "passed") or been
attested by a console admin.
Card issuance does not ask for your programme's settings when a card is issued. It reads its own copy, which the programme's change events keep up to date, and those go out on a once-a-minute cycle.
Right after you create a programme, that copy has not arrived yet, and issuance
does not guess. It answers 503 with code: "config_cold", issues nothing,
and succeeds once the settings are there — normally within about a minute.
Retry with backoff. If it keeps refusing for more than a few minutes, the
settings have not reached card issuance: re-send them by updating the
programme's modules (sending their current values is enough).
Changing an existing programme's settings is different. Issuance goes on
applying the settings it already has until the change arrives, normally within
about a minute, and does not refuse in the meantime. So switching KYC on for
a programme that is already issuing cards gates issuance only once the change
has arrived; until then a card can still be issued to a cardholder whose
kyc_complete is false. Switch KYC on when you create the programme, or
before you issue any cards on it. Switching KYC off lags the same way: for
that window issuance can still refuse a cardholder the programme no longer
requires to be verified.
Three cardholder fields tell the story. kyc_state records what the
verification engine concluded (unverified, pending, in_review, passed
or failed); attested records a console admin's override; kyc_complete
derives from the two. When deciding whether issuance can proceed, read
kyc_complete — an attested cardholder keeps kyc_state: "unverified"
because attestation is an exemption from verification, not a verification
verdict.
Verification checks
A verification case is opened with Start a KYC check, which pins the check to the programme's active policy version and begins collecting applicant data. Attach that data with Attach applicant data — it is stored under purpose-bound custody and referenced by token, and API clients are the intended intake path: your backend collects from your user and submits on their behalf.
The cardholder must belong to the programme the check is opened under, in
the same mode as your token. A cardholder of another programme gets the same
404 as an id that does not exist, and so does a cardholder of another
organisation. Deciding a referred check makes the same
check of the check's own cardholder, and refuses with 403
(cardholder_outside_case_programme) when it belongs to another programme.
If that check cannot be made, the
request fails with 502 and nothing is opened or decided; retry it with the
same Idempotency-Key.
The case advances to evaluation once the policy has the inputs it requires,
then completes on its own. A check's public state moves through pending
while collecting and evaluating, and ends passed, failed, or in_review
when the policy refers it to a human. A case left without its required inputs
eventually ends expired (ageing is visible via created_at and
expires_at on the check).
That's the full state enum — five values, and it does not carry a sixth.
There is no rejected state: when a referred check is
decided against the applicant, its state moves to failed — the same
value an automated policy failure carries. rejected is deliberately absent
from the enum, not an omission; to tell a human rejection apart from an
automated failure, read the decision itself with
List decisions rather than state.
Follow a single check with Retrieve a KYC check,
which includes reason_codes drawn from the evidence recorded against it, or
list the tenant's checks with List KYC checks —
oldest first, filterable by state and programme.
Document capture
Where a check needs a captured identity document, mint a capture session with Mint a capture-widget session token. It returns a 15-minute bearer token scoped to that one check. The token is re-usable until it expires — the widget may scan several times against one session (up to 10 scans, at most one every 3 seconds) so an applicant can retake a blurry photo without re-minting — hand it to the hosted capture widget, never your own OAuth client credentials, so the widget can post the captured image on your behalf. A session is only mintable while the check is still collecting.
Embedding the capture widget
capture_url from Mint a capture-widget session token
is a ready-made page carrying the document-capture UI. By default the page
follows the end user's device appearance (prefers-color-scheme); if your
app has a light/dark setting of its own, pass theme: "light" or
theme: "dark" when minting and the page is pinned to it — the choice rides
capture_url, so nothing else changes in how you embed. Host it one of two
ways.
iframe embed. Set capture_url as an iframe's src on a page your own
customer controls. The widget notifies the host of lifecycle events by
posting a message to each origin your programme has registered on its
capture-origins allow-list — never to *, and never to an origin that isn't
registered.
Native WebView. Load capture_url as the WebView's top-level page rather
than inside a frame. In this shape window.parent === window, so the iframe
delivery path never fires; instead the widget posts every event through
window.ReactNativeWebView.postMessage, which only accepts a string, so each
event is JSON-stringified before it's sent.
The event envelope
Both delivery paths carry the same JSON shape:
{ "source": "rigid-capture", "version": 1, "event": "...", "...": "event-specific fields" }source is always "rigid-capture". version is always 1 today, and only
changes on a breaking change to this envelope. event and whatever fields
follow it depend on which event fired — see the table below.
Event vocabulary
| Event | Payload | Meaning |
|---|---|---|
ready | — | The widget has loaded and is ready to begin capture. |
submitted | mrz_extracted: boolean, document_type, side | The applicant submitted a document image; mrz_extracted reports whether the machine-readable zone was read from it, and document_type/side name which document class and which side (front/back) the image belongs to. |
submitted | kind (details, proof_of_address or selfie) | Workflow-mode and details steps: the applicant submitted a form screen, a proof-of-address image or a selfie. A selfie also carries provenance, and routed: "review" when it was routed to manual review. |
completed | case_id | The capture flow finished; the check is ready to be evaluated. In a workflow it fires once, at the end of the whole workflow, not after each level. |
error | code | The widget hit an error it can't recover from. |
expired | — | The capture session's token expired mid-flow. |
completed's case_id can be null — the scan-budget-exhaustion path lands
on this same terminal even when no scan ever succeeded, so a caller must
handle a null case_id rather than assume completed always carries one.
For a two-sided document class (a card, not a passport) submitted fires
once per side — each side consumes its own scan-budget attempt — while
completed still fires exactly once, after the last side the case needs. A submitted with a kind fires once per submitted screen, and workflow-mode completed waits for the end of the workflow.
These five names are the entire contract. While an applicant works through a
scan the widget moves through several internal screen phases — framing
guidance, retake prompts, and so on — but those are not part of this message
contract and can change without notice. Match only on the event names
above.
Content-Security-Policy and embedding scope
The capture page's Content-Security-Policy sets frame-ancestors per
session, scoped to the programme's registered capture-origins allow-list —
the same origins events are posted to in the iframe shape. Only an origin on
that list can embed the page in an iframe. If the programme has registered no
capture origins, frame-ancestors is 'none': the page can then only ever
load top-level, either as a full-page navigation or inside a native
WebView — never inside any iframe, registered or not.
WebView integration notes
A few details the field surfaced that aren't obvious from the API alone:
- Register the capture page's origin in the WebView's
originWhitelistas a bare origin (https://vision.example.com), not a path underneath it (https://vision.example.com/*) — on some platforms a path-suffixed entry opens the link in the system browser instead of loading it in the WebView. In production that origin ishttps://verify.rigid.fi, the host every productioncapture_urlis on. - Grant the WebView camera/media-capture permission before navigating to
capture_url; capture cannot proceed without it. - Once the scan phase is live, let the widget own the screen. Don't render your own primary "Continue" affordance over it — the widget drives its own progression through capture, and a host-level control racing it produces a confusing double interface.
Face match
Where a check needs a selfie compared against its captured document, attach one directly — no widget, no operator supervision required — with Attach a selfie image:
curl -X POST https://api.rigid.fi/v1/kyc/checks/<check-id>/selfie-image \
-H "Authorization: Bearer $RIGID_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "selfie_image_base64": "<base64-encoded JPEG or PNG>" }'This is the API-population intake: your own backend collects the selfie from
your user and submits it on their behalf, the same intake shape as
Attach applicant data. A replacement selfie erases
the one it supersedes, and if the case is already evaluating and the active
policy requires face_match, attaching one enqueues a fresh evaluation.
Idempotency-Key is required.
Read it back with Read a check's selfie
image — same custody tier and
404/410 shape as the document image. Its response
also carries provenance, stating how the selfie was captured: submitted
for this intake path, or controlled for an operator-supervised capture.
Programme policy
Each programme carries a KYC policy — which signals a check must produce before it can pass. Get the active KYC policy returns the current version, seeding version 1 from the platform default on first read; policy is scoped per programme and per mode, so test and live carry independent histories.
Policy versions are immutable.
Write a new policy version recomposes the
policy from the active version plus your requested required_signals set —
you toggle signals on or off, and the server owns how their evidence is
weighted. Checks in flight stay pinned to the version they started under.
Data quality is a signal like any other: leave data_quality out of
required_signals and it neither runs nor weighs in. While it is on,
rules.data_quality_checks switches its checks one by one —
name_characters, date_of_birth_parseable, minimum_age,
document_expiry and nationality, each on unless you set it to false.
Leave the object out and all five run, as they always have. A check you
switch off is not run, and a field only that check needed is no longer
required. When no signal that carries weight has anything to say about a
check, the check is referred to a human, never failed on a score of zero.
A saved policy draft can also set
what the policy decides with. bands sets approve_at_or_above and
reject_below, two scores between 0 and 1 with reject_below no higher than
approve_at_or_above; a score between them is referred. ttl_seconds is how
long a check may stay open before it expires — counted from the moment it is
started, and covering a check still waiting for inputs, being evaluated, or
sitting in review — and retention_seconds how long the applicant's personal
data is kept, up to 365 days. extra_required_inputs lists detail fields you require on top of the
ones your checks need. Each carries forward to later versions until you
change it, and a value out of bounds is refused with a 400 that names the
field. Write a new policy version does
not accept these four; publish a draft to change them.
Details fields
The details step is the one step of the hosted flow that asks the applicant
to type rather than to photograph, and the policy says what it asks.
required_fields and optional_fields choose the fields and whether each
must be answered, and field_order the order they appear in. The fields a
switched-on check depends on stay required whatever you choose: the names
and date of birth sanctions screening compares; the names while data
quality's name_characters check runs, and the date of birth while its
date_of_birth_parseable or minimum_age check runs; and the date of birth
or nationality an eligibility rule reads. Switch the check off and the field
is yours to keep, make optional or drop. Anything in extra_required_inputs
is required as well.
field_config chooses how each field is asked, keyed by field:
{
"field_config": {
"nationality": {
"input": "dropdown",
"hint": "As shown on your passport",
"options": [
{ "value": "GBR", "label": "United Kingdom" },
{ "value": "IRL", "label": "Ireland" }
]
},
"date_of_birth": { "input": "text" }
}
}inputistext,dropdownordate, as far as the field allows. A date field is a date picker unless you ask for it as free text; it is still checked as a date (YYYY-MM-DD) either way. Any other field is free text unless you make it a dropdown of theoptionsyou list. A country field's option values are ISO 3166-1 alpha-3 codes.hintis a line of up to 200 characters the applicant reads under the field.optionsgo withdropdownand nothing else.labelis what the applicant sees; thevalueis what is stored.
The hosted capture page asks for each field the way it is configured, and
refuses a dropdown value you did not offer. The policy keeps configuration
only for fields the flow asks for, so removing a field removes its
configuration too. Any configuration that cannot be honoured, for a field
the flow asks for or not — a date offered as a dropdown, a country option that is not an
alpha-3 code — is refused with invalid_field_config. So is publishing a
nationality dropdown that offers no nationality your allowed_nationalities
rule accepts; a draft holding one still saves, so you can fix it. A dropdown with no
options never gets that far: request validation refuses it, a 400 with no
code.
Workflow mode
A flow's draft may instead hold a workflow: a graph of reusable
levels (screens of detail fields, your own questions and
capture blocks) joined by edges, some with a condition, and ending at terminals that put
tags on the case. In workflow mode the server owns the fields:
required_fields, optional_fields, field_order and field_config are derived from the
levels and refused on the draft with workflow_owns_fields, and level_snapshots and
level_names are refused with snapshots_are_server_owned. Create and edit levels with
Create a KYC level and
Update a KYC level, list them with
List KYC levels, then save the graph with
Save the policy draft and publish it with
Publish the policy draft. Saving a draft with a
graph problem succeeds and reports the problems; publishing one is refused. Publishing
snapshots the levels the graph uses into the new policy version, so a check keeps the
screens it started with when a level is edited later: the edit reaches new checks only once the
workflow is published again. A level edit alone is enough for that: with no draft saved,
Publish the policy draft republishes the active
version with fresh level snapshots when a level it uses has changed its definition since that
version was published. A rename does not count as a change. With no draft and no changed level
the publish is refused, 404 with code no_draft.
The hosted flow then asks each level's screens in turn, skipping a screen whose answers the
applicant's document already gave. A check's awaiting names what is still outstanding and may
read proof_of_address as well as details, document and selfie. A case ends at a terminal
and carries its tags on the check (tags); filter your checks with tag
(List KYC checks) and read the tags in use with
List check tags. The answers to your own questions
(custom_fields) and the files an applicant uploaded appear on
Read submitted applicant data, with the keys a document read
filled in rather than the applicant (extracted_fold); read an uploaded file with
Read an uploaded file.
workflow.start names the level the applicant meets first; a workflow that starts at a
terminal is the problem start_is_terminal and cannot be published. A workflow may open with a
start screen, workflow.intro: a title, an optional description and an optional
button_text ("Start" when absent). The hosted flow shows it before the first level. It
collects nothing and no condition can read it. In a live check it is shown while the check is
still at its first level and the applicant has captured nothing yet — details you submitted
for them in advance do not count — and not again in the same browser tab once they have
continued past it.
A document block may limit the documents it accepts with its own accepted_document_types
(passport, national_id, residence_permit, driving_licence, at least one); the applicant
is offered only those on that screen. In workflow mode the flow's accepted_document_types is
then the union across the document blocks the graph reaches, a block that sets none counting
as the draft's own list.
Conditions — when an edge is taken, and when a field is shown — are stored as text in the expression language. The console's condition builder writes them as rows of a field, an operator (is, is not, is one of, is not one of, is known, is not known, or is ticked and is not ticked for a checkbox) and a value, any of several groups of rules, and reads the result back as a sentence. A condition it cannot lay out as rows opens as text and is never rewritten.
To start a new flow from an existing one, Create a KYC flow
with start_from: { "flow_key": "<key>" }: the new flow's version 1 is that flow's active
version, its level snapshots and branding included, so it publishes as the source does. An
unknown or archived source is 404 flow_not_found. "default" copies the default flow, and
"blank" starts from the platform baseline.
Test a flow
To see a flow as an applicant will, start a test check from the console: open Flows, choose the flow, and use Start a test check. It works in test mode only; in live mode the action is disabled and says so. It creates a test cardholder named "Test check — " followed by the flow's name, in the flow's own programme, then opens a check on that flow and mints a capture session for the whole journey. The result links to the check in the console and to the hosted capture page, whose link expires after 15 minutes.
The check runs the flow's published version, like any other check: publish a
draft before testing it. The cardholder and the check stay, as ordinary
test-mode records. The same three calls work from your own backend in test mode:
Create a cardholder,
Start a KYC check with the flow's flow_key, and
Mint a capture-widget session token
with "kind": "flow".
Referred checks
A check the policy cannot settle lands in_review, and someone must decide
it. Record a decision resolves a referred case
to approved or rejected, and requires a named human reviewer — the
authenticated caller is recorded as the actor and may act on the reviewer's
behalf. Deciding emits a second kyc.check.completed event with a newer
checked_at.
A referred case isn't only approve-or-reject: where the document itself was
the problem, Request a re-capture is the
third option. It reopens the case for one more scan instead of forcing a
decision on what it already has — the case moves back to collecting/evaluating,
a fresh capture_url is minted for the applicant, and the attempt is recorded
as a recapture_requested decision naming the reviewer. No
kyc.check.completed fires (nothing has completed); a properly re-scanned
document lets the case reach its own decision, automated or not, exactly as
if it had read cleanly the first time.
For adjudication and audit,
List evidence shows per-signal findings
in production order (which signal produced which finding, under which engine
version, with what score and reason codes),
List decisions shows the decision
history (the policy decision first, then any human decision),
Read submitted applicant data returns
the human-adjudication slice of the applicant's data, and
Read a check's document image
returns the captured document as a base64 image once one has been submitted
(404 before that, 410 if it has since been crypto-erased under the
retention policy) — every read of either is reported to the platform's PII
audit pipeline.
Sanctions hits
A person is screened against the sanctions lists when their KYC check screens
them, and re-screened whenever a list changes. When a re-screen finds a new possible
match, screening.hit.raised
is sent to the person's programme. It carries the match and why it was raised
— per candidate, the list, the list's reference, the listed name, the name
that matched, the entry's kind and regimes, the score, and whether the date
of birth and nationality agree — and names the person only by our
identifiers: the screening subject, and the KYC checks and cardholders they
were screened for. It never carries the person's own name or date of birth.
List a programme's hits with
List screening candidates.
A reviewer decides each hit in the console or with Record a disposition on a screening candidate:
| Decision | Request | Meaning |
|---|---|---|
| close | disposition: "true_match", outcome: "close" | The person is the listed one; stop their cards. |
| ignore | disposition: "false_positive" | The person is not the listed one. |
| approve | disposition: "true_match", outcome: "approve", legal_basis | The person is the listed one, and a legal basis allows serving them: licence, not_asset_freeze, no_nexus or delisted. |
Every decision takes effect only when a second, different reviewer records
the same one — for an approval, the same legal basis too. Until then it is a
proposal awaiting confirmation, and the decision already in force stays: one
reviewer can neither clear a hit nor undo a confirmed decision.
screening.hit.dispositioned
is sent when the decision in force changes, and carries the outcome, the
candidate, the programme and whom the decision is about (subject_id,
kyc_check_ids, cardholder_ids) — again never the person's name or date of
birth.
A confirmed close suspends every active card that the person's cardholders
hold under the deciding programme, and while the close stands none of those
cardholders' cards can be activated, first time or again: the move to active answers
409 cardholder_under_sanctions_close in test mode (in live mode, the
read-only rule answers 403 first). The close stands until two reviewers
lift it by approving the match on a legal basis or ignoring it. Lifting it
lifts the activation block only; suspended cards stay suspended until you
reactivate them.
A close stops the cards and nothing else. Reporting the match to the competent authority, and deciding what happens to the relationship, remain the programme's duty.
Attestation
Not every programme uses our verification. If you establish a cardholder's identity yourself — your own KYC provider, an existing account relationship, an onboarding done face to face — you record that as an attestation, and the cardholder then clears the issuance gate without a check ever being opened.
The sequence is: create the cardholder with Create a cardholder, then attest them. The operation is Attest a cardholder, and the console's cardholder list and cardholder detail page both carry an Attest action that calls it.
Attestation requires a console admin session. It is not reachable by
any API client, org-wide or programme-pinned: a client-credentials token is
rejected with 403 whatever its scope, because the check is on the caller
being a signed-in person rather than on scope alone. That is a deliberate
refusal, not a gap. Attestation overrides the KYC gate, so it has to name a
human who chose to override it, and an unattended integration must never be
able to self-attest the cardholder it represents. If you want a cardholder
cleared from your own backend, open a check and drive
it to a decision — attestation is not an API route to the same outcome.
What an attested cardholder looks like
Attesting writes the first three fields below. The last two are what reading the record back then tells you:
| Field | After attestation |
|---|---|
attested | true |
attested_by | the id of the console user who attested |
attested_at | when they did |
kyc_complete | true, derived — the gate is satisfied |
kyc_state | unchanged: still whatever our engine last concluded, which for a cardholder you never submitted is unverified |
Read plainly, that record says: unverified by Rigid's KYC, and attested by
you. kyc_state: "unverified" sitting next to kyc_complete: true is not a
contradiction and not a bug to work around — it is the platform declining to
claim a verification it never performed. kyc_complete is the only field to
branch on for issuance; when issuance actually checks it is set out in
the KYC gate. kyc_state is the engine's verdict and nothing
else writes it.
Who carries a wrong attestation
You do. We did not check this person. An attestation is your statement that
you did, and the record keeps the name attached to it: attested_by is your
own console user's id, attested_at is the moment, and a cardholder.attested
entry lands in your audit trail with the cardholder before and after. If the
attestation turns out to be wrong, and a card is in the wrong hands because of
it, the exposure is yours and so is the account of how that cardholder came to
be issuable. Attest when you hold your own evidence and could produce it later.
Open a check when you don't.
Three consequences worth knowing before you attest:
- It cannot be withdrawn. There is no un-attest operation and no console
action for one, and an attestation does not expire. Nor is it replaced:
attesting a cardholder who is already attested changes nothing, so the first
attestation's
attested_byandattested_atstay on record and no second audit entry is written. - It outlives a later verification. If a check for the same cardholder
later fails,
kyc_statebecomesfailedwhileattestedstaystrue, sokyc_completestaystrueand the cardholder stays issuable. The console marks that combination with a cautionary Attested badge; over the API you have to read both fields to see it. - It freezes identity. Once
kyc_completeistrue, whether by attestation or by a passed check,full_nameandcountryare locked and Update a cardholder rejects a change to either with422andidentity_locked.emailandphonestay editable for the life of the cardholder — see cardholder contact details.
There is no webhook for attestation. cardholder.attested is an audit record,
not a delivered event: no subscription observes it, and attesting does not
emit cardholder.updated either. If your own systems need to know, record it
where you triggered it.
Webhook events
Three events cover the check lifecycle:
kyc.check.started when a case
opens, kyc.check.completed
when it settles (and again if a referred case is later decided), and
kyc.check.expired when an
unfinished case ages out. Wait for kyc.check.completed rather than polling
Retrieve a KYC check; delivery, verification and
retries work as described in the webhooks guide.