window.Veriox object on every page where the worker is active. You can use this to trigger verification from your own code, regardless of how the automated trigger is configured.
Methods
window.Veriox.requireVerification()
Shows the verification popup. Returns a Promise that:
- resolves when the visitor successfully completes verification
- rejects with
Error('dismissed')if the visitor closes the popup
window.Veriox.isVerified()
Returns true if the visitor has a valid verified session, false otherwise. Checks for the session cookie set by the Veriox worker after a successful verification.
When to use the JS API
The JS API is useful for custom flows where the built-in trigger options don’t fit:- You want to gate a specific action (e.g. adding to cart) without showing a popup on page load
- You are building a custom UI and want full control over when the popup appears
- You want to conditionally show different content depending on verified status
The
window.Veriox object is always available on pages where the worker is active — you do not need to select a specific trigger mode to use it.Mobile behaviour
On mobile, verification runs as a full-page redirect rather than an in-page overlay (this is required for the handoff to the Concordium ID app to work reliably on iOS and Android). One consequence for the JS API: When the visitor finishes (or dismisses), they’re redirected back to the page they came from. Detect the result on load and resume from there:isVerified() is true immediately after the overlay completes — so you can write one integration for both.
Desktop keeps the in-page overlay and the
requireVerification() Promise resolves as documented above. The patterns here only matter if you support mobile visitors. The automated global and URL pattern triggers need no code and are unaffected.
