@lmnto/manual-kyc-sdk
v1.0.3
Published
Manual KYC SDK for identity verification
Downloads
320
Readme
@lmnto/manual-kyc-sdk
A comprehensive React SDK for manual KYC (Know Your Customer) identity verification. This package provides a complete solution for collecting and verifying user identity documents, selfies, and personal information.
Features
- 📋 Complete KYC Form - Collect user information including name, email, date of birth, and more
- 🆔 Document Verification - Support for ID cards and passports with front/back uploads
- 🤳 Selfie Verification - Capture and verify user selfies with custom instructions
- 🎨 Customizable - Pass custom text for PEP declarations and selfie instructions
- 🔐 Secure - Token-based authentication with configurable API endpoints
- ♿ Accessible - Built with accessibility in mind
- 📱 Responsive - Works seamlessly across all device sizes
Installation
npm install @lmnto/manual-kyc-sdkor
yarn add @lmnto/manual-kyc-sdkUsage
Basic Example
import { Sdk } from '@lmnto/manual-kyc-sdk';
function App() {
return (
<Sdk
token="your-applicant-token"
apiBaseUrl="https://your-api-url.com/api/v1/"
/>
);
}With Custom Text
import { Sdk } from '@lmnto/manual-kyc-sdk';
function App() {
return (
<Sdk
token="your-applicant-token"
apiBaseUrl="https://your-api-url.com/api/v1/"
infoText="I hereby declare that I am not a PEP/PEP affiliate, or a Sanctioned individual. I furthermore declare that I do not deal and/or conduct any business with Sanctioned Individuals/Entities, or with PEPs, close associates of PEPs, and/or their family members."
selfieInstruction="Please take a clear selfie while holding a piece of paper that shows today's date (dd/mm/yy) and the platform name (YOUR PLATFORM). Make sure your face is fully visible and the details on the paper are easy to read."
/>
);
}Props
| Prop | Type | Required | Description |
|------|------|----------|-------------|
| token | string | ✅ | Applicant authentication token |
| apiBaseUrl | string | ✅ | Base URL for your KYC API endpoint |
| infoText | string | ❌ | Custom text for PEP (Politically Exposed Person) declaration info icon |
| selfieInstruction | string | ❌ | Custom instruction text for selfie verification |
Components Included
Sdk (Main Component)
The main SDK component that handles the entire KYC flow including:
- User information collection
- Document type selection (ID Card or Passport)
- Document upload (front/back for ID, single for Passport)
- Selfie verification
- Form validation and submission
Form Fields
- First Name - User's first name
- Last Name - User's last name
- Email - Email address with validation
- Date of Birth - Date picker for DOB
- Country - Country selector
- Document Type - ID Card or Passport selection
- Document Number - ID/Passport number
- Document Expiry Date - Document expiration date
- PEP Declaration - Checkbox with customizable info text
Document Upload
- Drag and drop zone for document images
- Support for ID Card (front and back)
- Support for Passport (single image)
- Image validation and preview
Selfie Verification
- Camera capture or file upload
- Custom instruction text support
- Image preview
Status Handling
The SDK automatically handles different KYC statuses:
- Pending - Application is under review
- Approved - KYC verification completed successfully
- Rejected (Soft) - User can resubmit with corrections
- Rejected (Final) - Application cannot be resubmitted
API Integration
The SDK expects your API to provide the following endpoints:
Required Endpoints
Check Status -
GET /applicants/check-status- Returns current KYC status and user level
Submit KYC -
POST /kyc/submit- Accepts form data and document images
Countries -
GET /countries- Returns list of available countries
Expected API Response Format
// Check Status Response
{
kycStatus: "PENDING" | "APPROVED" | "REJECTED_SOFT" | "REJECTED_FINAL",
kycLevel: "PERSONAL" | "BUSINESS"
}
// Countries Response
[
{
name: "United States",
code: "US",
disabled: false
}
]Styling
The SDK comes with built-in styles. All components use CSS modules to avoid style conflicts with your application.
TypeScript Support
This package is written in TypeScript and includes type definitions out of the box.
import { Sdk, SdkProps } from '@lmnto/manual-kyc-sdk';
const props: SdkProps = {
token: "token",
apiBaseUrl: "https://api.example.com/v1/",
infoText: "Custom PEP text",
selfieInstruction: "Custom selfie instruction"
};Browser Support
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Requirements
- React 18.2.0 or higher
- React DOM 18.2.0 or higher
License
ISC
Support
For issues, questions, or contributions, please contact the maintainers.
Version
Current version: 1.0.1
Organization
Published under @lmnto organization.
