Skip to main content
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.
Secure Identity Input mounts a single Fluz-hosted field that collects the last four digits of a user’s US Social Security Number. When you submit, the frame sends those digits to Fluz along with the name, date of birth, and address your page collects. Fluz runs the same check as Verify by SSN and returns the outcome. The digits stay inside the frame, so your page and servers never see them.
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_KYC scope 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 when VERIFY_KYC is present.
Your embedding origin also has to be allow-listed, as for every Secure Elements capability — see Prerequisites.

Mint an identity token

Call POST /v1/client-token with "purpose": "identity":
Like a tokenization token, it takes no resource id. It lasts 30 minutes by default, so the user has time to fill in the rest of your form.

Render the field

The frame holds one input that accepts exactly four digits, with 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

Same shape as Card Reveal: rejects with 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

Fires on every keystroke inside the frame. There’s no 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 to submit(). 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.
Check every field yourself before you call submit(). The frame validates only the four digits. A missing name, date of birth, or address field comes back as a generic SUBMIT_FAILED, with nothing to say which field it was. Submit the user’s residential address — see Address Formatting Requirements.
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

There’s no 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

Removes the frame and detaches all listeners. A submit still in flight is dropped — neither 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.