Skip to main content
This page assumes you’ve read Secure Elements Overview — it covers minting a client token, loading the SDK, and styling fields, all of which apply here.
VAN Reveal is the same capability as Card Reveal, applied to a virtual account number instead of a virtual card: it shows a user the account number and routing number for one of their own VANs, inside Fluz-hosted frames your page can’t read into.

Mint a reveal token

Call POST /v1/client-token with "purpose": "van-reveal" and the virtualAccountNumberId you want to show:
Pass the clientToken and loadToken it returns straight into createAccountViewer below. Minting this token requires the LIST_PAYMENT OAuth scope — the same scope getSpendAccountVirtualAccountNumbers requires, so an integration already listing VANs needs no new provisioning to reveal one. This is distinct from Card Reveal’s CREATE_VIRTUALCARD and Secure Card Input’s MANAGE_PAYMENT.

Create the viewer

fields controls which pieces of the VAN render, in order — omit it and you get ["accountNumber", "routingNumber"]. Each entry is either a bare field name or a { field, individualReveal } object, the same shape as createCardViewer’s fields. accountNumber and routingNumber are the only valid field names — anything else throws a FluzElementsError (error.code === "INVALID_FIELD") synchronously, from createAccountViewer itself, before you ever call mount().
Only accountNumber is vault data. routingNumber is cleartext metadata Fluz already has at grant-mint time, so it renders immediately and reveal()/reveal("routingNumber") has no effect on it — there’s nothing to fetch. individualReveal on accountNumber behaves exactly like it does on Card Reveal’s fields: it defaults to true, and setting it to false prevents that field from being revealed on its own via reveal("accountNumber") — see Reveal a single field for the same pattern applied to a card field.

Mount it

mount() appends one sandboxed iframe per configured field into the container element you pass it, and returns a promise that resolves once every frame has completed its handshake. It rejects with a FluzElementsError the same way createCardViewer’s viewer does — see Card Reveal’s Mount it for the full list of INVALID_STYLE / MOUNT_TIMEOUT / MOUNT_FAILED cases.

Reveal and mask fields

reveal(), reveal(field), and setMask() behave exactly as they do on Card Reveal — the same async/sync split, the same { hidden: true } option to blank a field completely instead of showing its masked placeholder, and the same destroy() to tear down every frame. Calling either against routingNumber is a no-op beyond toggling its own masked/unmasked display state, since that field is never fetched from the reveal endpoint. As on Card Reveal, the promise from reveal() settles only once the targeted fields are showing their real values, and rejects with REVEAL_FAILED, RATE_LIMITED, or REVEAL_TIMEOUT otherwise — see Know when a reveal finishes. Revealing routingNumber resolves immediately, since there’s nothing to fetch. createAccountViewer accepts the same revealTimeoutMs option.

Handle events

Same shape, and the same error codes, as Card Reveal’s Handle events — INVALID_FIELD, INVALID_FRAME_HOST_ORIGIN, INVALID_STYLE, MOUNT_TIMEOUT, MOUNT_FAILED, INDIVIDUAL_REVEAL_DISABLED, REVEAL_FAILED, REVEAL_TIMEOUT, FIELD_ERROR, and RATE_LIMITED.

Full example

/mint-van-reveal-token is your own backend route — the one that calls POST /v1/client-token with "purpose": "van-reveal" and your Fluz OAuth access token, as described in Mint a client token.

Next steps

Secure Elements Overview

Token minting, SDK loading, styling, and CSP.

Card Reveal

The same capability, applied to a virtual card’s PAN, expiry, and CVV.

Virtual Account Numbers

How a VAN is provisioned, and how to list the ones on a spend account.

Secure Card Input

Collect a physical card and add it as a payment method.