Installation
The official Loyalty.lt JavaScript SDK is available on npm and can be used in Node.js, React, Vue, and any JavaScript environment.NPM / Yarn
CDN (Browser)
For browser-based applications without a build system:Requirements
Node.js
Node.js 16.0.0 or higher
TypeScript
TypeScript 4.0+ (optional, types included)
For React Components
If you plan to use the React components (QRLogin, QRCardDisplay), you also need:
Quick Start
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | - | Your API Key (required) |
apiSecret | string | - | Your API Secret (required) |
environment | 'production' | 'staging' | 'production' | API environment |
locale | string | 'lt' | API locale (lt, en) |
timeout | number | 30000 | Request timeout in ms |
debug | boolean | false | Enable debug logging |
retries | number | 3 | Number of retry attempts |
Getting API Credentials
Access Partners Portal
Go to partners.loyalty.lt and log in to your account.
Next Steps
Basic Usage
Learn how to use the SDK for common operations
QR Login
Implement QR code-based login
QR Card Scan
Customer identification via QR code
React Components
Pre-built React components