This page assumes you’ve read Secure Elements
Overview — it covers loading the
SDK and the shared client-token flow, both of which apply here.
You get back a verification outcome, not a token.
onSuccess receives
APPROVED, DECLINED, DUPLICATE, or ERROR — never a token, an alias, or
the digits themselves. There’s no reveal for identity data either: nothing
collected here can be read back through the SDK.See it live
The demo mints its own token and mounts the field automatically. It’s wired to a stub, so it never reaches real identity verification — the four digits you enter pick the outcome:
0000 returns DECLINED, 1111 returns DUPLICATE, and anything else returns APPROVED. Use Remint token & remount to start over. Open it in its own tab →
Before you start
Two separate gates control this capability. You need both before you can mint a token:- The
VERIFY_KYCscope on the access token you mint with. Fluz enables it on your application — see Required scope. Mint with the access token of the user you’re verifying, the same token Verify by SSN uses. - The identity-input capability, which Fluz enables on your application by hand. It’s off by default for every application, whatever scopes it holds. Send your Fluz contact a signed use case to have it turned on. Until then, minting fails with
403 capability_not_provisioned, even whenVERIFY_KYCis present.
Mint an identity token
CallPOST /v1/client-token with "purpose": "identity":
Render the field
Last 4 of SSN as its placeholder. Unlike Secure Card Input, the placeholder isn’t configurable.
The box-model
style properties Secure Card Input supports (width, height, border, backgroundColor) pass validation but have no effect on this frame.
Mount it
FluzElementsError for INVALID_STYLE, MOUNT_TIMEOUT, or MOUNT_FAILED (frame failed to load, or this instance is already mounted). frameHostOrigin is validated synchronously when you call renderIdentityFieldsForTokenization — an unrecognized origin throws INVALID_FRAME_HOST_ORIGIN before you reach mount().
The SDK doesn’t size the iframe it appends, so it renders at the browser default of 300×150 until you size it from your own CSS:
Track field state
field argument, since there’s only one field, and no brand. isValid turns true once exactly four digits are entered — use it to gate your submit button. The digits themselves never reach your page.
Submit
Collect the name, date of birth, and address as ordinary inputs on your own page and pass them tosubmit(). They aren’t framed, so your page does handle them.
There’s no
{ userAddressId } shortcut like Secure Card Input’s. To verify a user against details already on file, use KYC Autofill instead — it takes no SSN digits, so it doesn’t need this frame.
submit() almost never rejects, and never for a decline. It only throws for
MOUNT_FAILED (not mounted yet) or SUBMIT_FAILED (“a submit() call is
already in progress”). Every other outcome resolves normally and arrives
through the callbacks below.Handle results
onDeclined. Every outcome Fluz reaches arrives through onSuccess, including a decline — a decline here is Fluz’s answer, not a failed request. onError fires only when no answer came back at all.
This runs the same verification as Verify by SSN, so the same statuses, the same three-attempt limit, and the same KYC_STATUS_UPDATE webhook apply:
onError covers everything that isn’t a verification outcome:
A generic
SUBMIT_FAILED doesn’t say which case you hit. One right after mount is most likely a missing field or rate limiting; one after a long idle period is most likely an expired session. For an expired session, mint a fresh client/load token pair and re-mount rather than retrying the same submit().
Cleanup
onSuccess nor onError fires for it. Call this on unmount, or before minting a fresh token to retry.
Full example
/mint-identity-token is your own backend route — the one that calls POST /v1/client-token with "purpose": "identity" and the access token of the user being verified.
Next steps
Secure Elements Overview
Token minting, SDK loading, styling, and CSP.
Verify by SSN
The verification this element runs, called directly from your server.
Secure Card Input
Collect a physical card and add it as a payment method.
Live demo
Try the identity field running against staging.