VerifiMeVerifiMe Developer Portal

Partner SDK

Download the TypeScript SDK generated from the VerifiMe Partner OpenAPI specification

The Partner SDK is a generated TypeScript client for the VerifiMe Partner API. It is built from the OpenAPI specification and published automatically whenever the spec changes.

Download

Loading SDK versions...

Prerequisites

  • Node.js 18 or later
  • @hey-api/client-fetch runtime (install once in your project):
npm install @hey-api/client-fetch

Installation

Extract the ZIP into your project, for example into src/verifime-sdk/:

unzip verifime-partner-sdk.zip -d src/verifime-sdk

Client Setup

Configure the client once at application startup, before making any API calls:

import { client } from "./verifime-sdk/client.gen";

client.setConfig({
  baseUrl: "https://api.prod.verifime.com",
});

For staging, use https://api.stage.verifime.com as the base URL.

Create an Invitation

Call invite() to create a verification session and get a link to send to your customer. Pass throwOnError: true so TypeScript correctly narrows the response type:

import { invite } from "./verifime-sdk";

try {
  const { data } = await invite({
    body: {
      email: "customer@example.com",
      code: "YOUR_ORG_CODE",
      referenceData: "internal-application-id-123", // optional, returned in webhook
      sendInvitationEmail: false, // set true to have VerifiMe send the email
    },
    throwOnError: true,
  });

  console.log("Tracking reference:", data.trackingReference);
  console.log("Invite URL:", data.inviteUrl);
  // Send data.inviteUrl or data.qrCodeUrl to your customer
} catch (err) {
  console.error("Invitation failed:", err);
}

Pre-filling Customer Details

Pass customerContext to pre-fill the onboarding wizard. Values are optional and can be changed by the customer during onboarding:

const { data } = await invite({
  body: {
    email: "customer@example.com",
    code: "YOUR_ORG_CODE",
    customerContext: {
      firstName: "Jane",
      familyName: "Smith",
      dateOfBirth: "1990-05-15", // ISO 8601 format
      preferredContactNumber: "+61400000000",
    },
  },
  throwOnError: true,
});

Poll Tracking Status

Use trackingStatus() to check whether the customer has completed data entry:

import { trackingStatus } from "./verifime-sdk";

async function waitForCompletion(trackingReference: string): Promise<void> {
  while (true) {
    const { data } = await trackingStatus({
      path: { trackingReference },
      throwOnError: true,
    });

    if (data.status === "Completed") {
      console.log("Customer has completed onboarding");
      return;
    }

    // Wait 10 seconds before polling again
    await new Promise((resolve) => setTimeout(resolve, 10_000));
  }
}

Status values:

  • Inactive: invitation created, customer has not started
  • Active: customer is progressing through the wizard
  • Completed: customer has submitted their data

Handle Webhooks

VerifiMe delivers a RISK_ASSESSMENT_UPDATED event to your webhook endpoint when a risk assessment is ready. Use the RiskAssessmentEvent type to type your handler:

import type { RiskAssessmentEvent } from "./verifime-sdk";

// Express example
app.post("/webhooks/verifime", (req, res) => {
  const payload = req.body as RiskAssessmentEvent;

  // Only act on completed assessments. Ignore PENDING and PRELIMINARY.
  if (payload.assessmentStatus !== "ASSESSED") {
    return res.sendStatus(200);
  }

  console.log(`Assessment complete for ${payload.customerName}`);
  console.log(`Risk level: ${payload.riskLevel}`);            // LOW | MEDIUM | HIGH | EXTREME
  console.log(`Reference: ${payload.metadata}`);               // your referenceData value
  console.log(`Portal URL: ${payload.assessmentPortalUrl}`);

  // Use payload.eventId to deduplicate retried deliveries
  res.sendStatus(200);
});

Error Handling

SDK functions accept throwOnError: true to throw on non-2xx responses (recommended):

try {
  const { data } = await invite({ body: { ... }, throwOnError: true });
  // data is fully typed, no optional chaining needed
} catch (err) {
  // err is the structured error response body
}

Alternatively, check errors explicitly without throwing:

const { data, error } = await invite({ body: { ... } });
if (error) {
  // handle error
  return;
}
// Note: data requires optional chaining (data?.field) under strict TypeScript

Integrity Verification

Each release includes a manifest.json alongside the ZIP:

https://sdk.verifime.com/sdk/<version>/manifest.json

The manifest contains the version, filename, SHA-256 hash, and generation timestamp:

# Linux
sha256sum verifime-partner-sdk.zip

# macOS
shasum -a 256 verifime-partner-sdk.zip

Compare the output against the sha256 field in manifest.json.

Versioning

Versions follow YYYY-MM-DD (or YYYY-MM-DD.N for same-day releases). A staging build is published on every change to the OpenAPI spec. A production build is promoted manually via the Promote SDK to Production workflow.

On this page