@nochance/verify-sdk
v1.0.0
Published
Nochance Platform verification SDK for Node.js and browsers
Maintainers
Readme
@nochance/verify-sdk
Official Node.js / browser client for the Nochance Verify API.
Security
- Never hardcode API keys in source or commit them to git. Use environment variables or a secrets manager.
- Do not ship live (
nc_live_) keys in front-end bundles; call the Verify API from your backend when possible. - This package contains no built-in credentials — you supply
apiKeyandappIdat runtime. - Only public API routes and response shapes are documented here; your keys stay on your servers.
Install
npm install @nochance/verify-sdkFor scoped packages under @nochance, configure npm auth per your org (see your Nochance dashboard or internal docs).
Usage
import { NochanceVerify } from "@nochance/verify-sdk";
const client = new NochanceVerify({
apiKey: process.env.NOCHANCE_API_KEY!, // nc_test_... or nc_live_...
appId: process.env.NOCHANCE_APP_ID!, // e.g. app_abc123 from dashboard
baseUrl: process.env.NOCHANCE_API_URL ?? "https://api.nochance.io/api/v1",
});
const session = await client.createSession(
{ externalUserId: "user_123" },
{ idempotencyKey: "user-123-session" }
);
// Headless step (use sandbox test data in TEST environment only)
await client.submitStep(session.sessionId, "BVN", "22222222222");
const status = await client.getSession(session.sessionId);
const embedUrl = client.getWidgetEmbedUrl(session.sessionToken);API surface
| Method | Description |
|--------|-------------|
| createSession | Start verification for an end user |
| getSession | Poll session status |
| submitStep | Submit a verification step (server-side) |
| check | Direct BVN / NIN / BANK check |
| getWidgetEmbedUrl | Hosted widget iframe URL |
License
UNLICENSED — Nochance Technologies. All rights reserved.
