Prembly Developer SDKs

Prembly's SDKs and APIs allow you to programmatically verify the identities of your customers in seconds through an easy, secure, and fully customizable integration. Whether you are building for web browsers, cross-platform mobile apps (React Native, Flutter), or backend microservices, our prebuilt UI components handle document capture, liveness challenges, and identity verification securely.


Getting Credentials

Before embedding Prembly's SDK into your application, you must generate your integration keys from the dashboard:

  1. Log into your Prembly Dashboard.
  2. Navigate to SDK Setup → Add New Widget.
  3. Create your configuration and copy your credentials:
    • widget_id (or config_id): The unique ID representing your verification workflow configuration.
    • widget_key (or merchant_key): Your public API key for client-side SDK initialization.

Security Requirement: Public Keys Only

Never expose your Secret Key (X-API-Key) in client-side code (browsers, React Native, or Flutter bundles). Client-side SDKs must only use your Public Key (widget_key). Perform all administrative operations and final session lookups exclusively on your backend server.


Choose your integration target below to view detailed installation steps, full prop tables, native permission setup, and troubleshooting guides:

PlatformPackage / ScriptGuide Link
Web (Vanilla JS)https://js.prembly.com/v1/inline/widget.jsView Web SDK Guide
React Webprembly-react-kycView Web SDK Guide
React Nativeprembly-react-native-kycView React Native Guide
Flutterprembly_identity_kycView Flutter Guide
Backend & WebhooksGET /api/v1/checker-widget/sdk/sessions/{id}/View Backend & Webhooks Guide

Sandbox & Testing

To test your integration without incurring charges or consuming live verification quotas, pass is_test: true in your configuration or switch your widget to Sandbox Mode in the dashboard.

// Example sandbox configuration flag
const config = {
  widget_key: 'your_public_widget_key_here',
  widget_id: 'your_widget_id_here',
  is_test: true, // Enables Sandbox mode
  email: 'test_user@example.com',
  callback: (response) => console.log('Sandbox callback response:', response)
};

Verification Results & Status Matrix

When a user completes or exits the verification flow, the SDK callback function fires with a standard response object.

Callback Status Values

StatusDescriptionUser Action Required
successUser completed verification and passed all identity and biometric checks.Proceed to onboard user / grant access.
failedUser completed verification but failed data validation or biometric checks.Prompt user to retry with valid documents.
closedUser exited or dismissed the verification modal before completion.Offer user option to resume verification.
errorA technical error occurred (e.g., network disconnect, timeout).Inspect error details and retry attempt.

Global HTTP Status Codes

When making server-to-server requests or handling API responses:

CodeStatusMeaning & Required Action
200 / 201SuccessRequest succeeded. Continue normal application processing.
400Bad RequestInvalid request payload, missing parameters, or incorrect data formatting.
401UnauthorizedMissing or invalid widget_key, widget_id, or backend secret API key.
402Payment RequiredWallet balance depleted. Fund your Prembly account wallet.
500 / 503Server ErrorTemporary service issue. Retry request using exponential backoff.

On this page

Prembly Slack Community

Join our developer Slack channel for real-time integration support, engineering updates, and direct Q&A with the Prembly team.

Join Slack Channel