Catalisa Biometrics SDKs
SDKs and integration snippets for Catalisa Biometrics — liveness and face-match sessions with a hosted capture page, an explainable decision and Ed25519-signed evidence.
| Package | ||
|---|---|---|
@catalisa/biometrics |
Node.js 18+ | Sessions, evidence verification, webhook verification, typed errors. Zero dependencies, ESM + CJS + types |
@catalisa/biometrics-web |
Browser | Opens the capture page as modal, iframe or redirect; typed postMessage events. ESM + CJS + UMD (CatalisaBiometrics) |
catalisa-biometrics |
Python 3.9+ | Sessions and webhook/evidence verification, standard library only |
API base URL: https://api.biometrics.catalisa.app/v1. Authentication: X-API-Key (or an IAM JWT as Authorization: Bearer). A test key runs the sandbox: simulated engine, no allowance spent, nothing billed.
The integration in one picture
your server ── POST /sessions ─────────────▶ Biometrics ── handoff.captureUrl ──▶ your server
your front ── opens captureUrl (link / iframe / modal / WebView) ─▶ hosted capture page
hosted page ── postMessage progress (ready, step:<GESTURE>, done…) ─▶ your front (never the result)
Biometrics ── webhook biometrics.session.completed (RSA-SHA256) ──▶ your server (the result)
The capture page never tells the person whether they were approved; the decision is read on the server.
Repository layout
packages/node @catalisa/biometrics (src, test, tsup → dist ESM/CJS/d.ts)
packages/web @catalisa/biometrics-web (src, test, tsup → dist ESM/CJS + UMD)
packages/python catalisa-biometrics (src/catalisa_biometrics, tests)
packages/go .../packages/go (stdlib only; tagged packages/go/vX.Y.Z)
packages/php catalisa/biometrics (src, tests; ext-curl/openssl/sodium only)
packages/dotnet Catalisa.Biometrics (src, tests; net8.0 + netstandard2.0)
packages/ruby catalisa-biometrics (lib, test; stdlib only)
packages/java io.github.catalisaio:… (src, tests; JDK + Jackson)
snippets/ short, complete snippets for the developer guide + index.json
examples/ node-server: full flow (session endpoint, modal page, webhook)
vectors/ crypto vectors generated by the building block's own code
scripts/ mock server, vector generator and the snippet/example verifiers
Snippets
snippets/<topic>/<language>.<ext> (one entry per language per topic), indexed in snippets/index.json (topic, language, title, file).
| Topic | Languages |
|---|---|
create-session |
curl, Node (SDK), Python (SDK), PHP, Java, Go, C#, Ruby |
get-session |
same |
verify-webhook |
minimal HTTP server in Node, Python, PHP, Java, Go, C#, Ruby; shell + openssl |
handle-errors |
402 QUOTA_EXCEEDED and 403 SUBACCOUNT_SUSPENDED in all 8 |
web-capture-link |
html (plain link / redirect) |
web-capture-iframe |
html (iframe without the SDK) |
web-capture-modal |
web (JavaScript with @catalisa/biometrics-web from npm), html (CDN bundle) |
mobile-capture |
React Native, Flutter, Android (WebView + Custom Tabs), iOS (WKWebView + SFSafariViewController) |
Environment variables used by the snippets: CATALISA_API_KEY, CATALISA_BIOMETRICS_URL (optional), SESSION_ID, CATALISA_SUBACCOUNT_ID, CATALISA_WEBHOOK_KEYS (JSON map keyId → public key PEM), PORT.
Development
npm install
npm test # node + web
npm run build
(cd packages/python && python3 -m venv .venv && .venv/bin/pip install pytest && .venv/bin/python -m pytest -q)Verifying the snippets
node scripts/verify-snippets.mjs # 32 server snippets; php/go/ruby/C# run in official docker images
node scripts/verify-web-snippets.mjs # 4 web snippets in jsdom
node scripts/verify-example.mjs # examples/node-server end to end- HTTP snippets run against
scripts/mock-biometrics.mjs, a mock that reproduces the server's routes, envelopes and error bodies (including the subaccount 402/403). - Webhook servers receive deliveries signed at run time by the building block's own code (
scripts/bb-vector.sh freshextractsorigin/mainofbuilding-blocks-v2withgit archiveand runssrc/webhooks-engine/utils/crypto.ts): a valid one must return 200; a tampered body and a 10-minute-old one must return 400.
Crypto vectors
vectors/vectors.json is produced by scripts/gen-vectors.bb.ts running inside a copy of the building block's source — the webhook signature by the Webhooks Engine's signPayload, the evidence signature by BiometricsEvidenceSignatureService.sign, and the list of capture page events from capture-page/page.ts. The Node, Web and Python test suites all read it, so a change in the server's signing format breaks the SDK tests. Regenerate with scripts/bb-vector.sh static vectors/vectors.json.
Publishing
See PUBLISHING.md.