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:
- Log into your Prembly Dashboard.
- Navigate to SDK Setup → Add New Widget.
- Create your configuration and copy your credentials:
widget_id(orconfig_id): The unique ID representing your verification workflow configuration.widget_key(ormerchant_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.
Platform SDK Quick Links
Choose your integration target below to view detailed installation steps, full prop tables, native permission setup, and troubleshooting guides:
| Platform | Package / Script | Guide Link |
|---|---|---|
| Web (Vanilla JS) | https://js.prembly.com/v1/inline/widget.js | View Web SDK Guide |
| React Web | prembly-react-kyc | View Web SDK Guide |
| React Native | prembly-react-native-kyc | View React Native Guide |
| Flutter | prembly_identity_kyc | View Flutter Guide |
| Backend & Webhooks | GET /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
| Status | Description | User Action Required |
|---|---|---|
success | User completed verification and passed all identity and biometric checks. | Proceed to onboard user / grant access. |
failed | User completed verification but failed data validation or biometric checks. | Prompt user to retry with valid documents. |
closed | User exited or dismissed the verification modal before completion. | Offer user option to resume verification. |
error | A 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:
| Code | Status | Meaning & Required Action |
|---|---|---|
200 / 201 | Success | Request succeeded. Continue normal application processing. |
400 | Bad Request | Invalid request payload, missing parameters, or incorrect data formatting. |
401 | Unauthorized | Missing or invalid widget_key, widget_id, or backend secret API key. |
402 | Payment Required | Wallet balance depleted. Fund your Prembly account wallet. |
500 / 503 | Server Error | Temporary service issue. Retry request using exponential backoff. |