Skip to main content

Mobile integration

Integrate Zyphe on mobile by loading the hosted verification flow in a WebView:

Your backend creates a verification session → your app opens the session URL in a WebView.

This works the same way for React Native, Flutter, native iOS (WKWebView), and native Android (WebView).

Why WebView

BenefitWhat it means for you
Near-native performanceModern WKWebView / Android WebView handle camera and UX with low friction
Security & complianceDocument capture, liveness challenges, and anti-spoof logic stay on Zyphe-controlled UI and backend
Instant updatesFlow and capture improvements ship without App Store / Play releases
Minimal client codeYour app only needs a session URL and a properly configured WebView

If you need the user to stay “inside” your app chrome, use a fullscreen WebView (zypheFullscreen=true) rather than reimplementing capture.

Architecture

Mobile app Your backend Zyphe
───────── ──────────── ─────
1. User taps "Verify"
2. App calls your API ───► 3. POST /sdk/flow/.../vr/create
4. Compose verify.zyphe.com URL
5. App opens WebView ◄──── 5. Return session URL
6. User completes KYC ──────────────────────────────► Hosted UI
7. (optional) app handles handoff / success URL
8. Webhook to your backend ◄── Results

Never put a secret API key (zyphe_sk_…) inside the mobile app. Session creation is always server-side.

Step-by-step

1. Backend: create a session

Use either:

Return only the session URL (and maybe a session id) to the app.

2. Compose / request a mobile-friendly URL

Append fullscreen for better mobile UX:

…&zypheFullscreen=true

Sandbox sessions must use the /sandbox/flow/… path. See Sandbox mode.

3. Embed in a WebView

iOS (WKWebView)

  • Request camera (and microphone if your flow uses active liveness) via Info.plist usage strings.
  • Allow media playback without requiring an extra user gesture where your WebView API permits it.
  • Load only https://verify.zyphe.com… session URLs, never the API host.

Android (WebView)

  • Declare CAMERA (and audio if needed) in the manifest; request at runtime before opening the flow.
  • Enable JavaScript and DOM storage.
  • Grant WebView permission requests for getUserMedia / camera (implementation varies by WebView wrapper).

React Native

Full copy-paste guide: React Native (WebView + permissions + backend sample).

4. Results

Prefer webhooks on your backend for the source of truth. Do not rely only on WebView navigation callbacks. Images are not in webhooks by default—see Export API.

Common mistakes

MistakeWhat to do instead
Putting zyphe_sk_… in the app binaryCreate sessions on your backend only
Pointing the app at docs.zyphe.com or api.zyphe.com as the “verification UI”Open the composed verify.zyphe.com session URL
Capturing ID photos in your own camera UI by defaultPrefer the hosted WebView; see direct API tradeoffs