KDPikaLicensing
API v1
Show all languages
Browse documentation

Choose a page in the navigation drawer.

KDPika Licensing · API v1 Intermediate

JavaScript SDK

Install and configure the official JavaScript SDK with exact members, safe lifecycle examples, storage and release limitations.

On this page
Updated 2026-10-29 UTCDownload Markdown

Desktop / Web access controls

Current SDK 2.2.0 supports desktop, web and both access policies. Business can restrict each software plan; Starter and Pro allow both apps under one App ID. Set up your applications and migrate safely. This release is verified on npm.

Prefer a guided first project?

Follow the visual dashboard steps and try the JavaScript example. The guide states clearly whether it uses an official SDK directly or a local Python learning helper.

Release status

SDK 2.2.0 supports the current required-fingerprint API, signed floating leases and online idempotent usage credits. Published on npm. Source ZIP and local installable packages remain available as alternatives.

Download SDK ZIP · GitHub source · Package registry

Runtime and installation

Node.js 22+; use a maintained LTS. Electron main process only. Browser hardware fallback is unsupported.

bashbash
npm install @kdpika/license-sdk@2.2.0

For source ZIP installation, extract it into your project and follow its README. Compare SHA-256 against the download table. All five SDKs use MIT; the hosted SaaS platform is separate. Capabilities and boundaries.

Activation and checks

Configure the public product App ID, explicit Sandbox environment for tests, application name/version and a private persistent state directory. Secret management API keys belong only on your server. Activate with a license key and the matching customer email when your application requires it.

The SDK collects product-salted hardware hashes and sends them on activation/validation with X-Installation-ID. It verifies the Ed25519 signed result, product/environment, installation and hardware binding before granting online/cached access. Missing hardware fails closed; browser-only JS/WASM has no fallback. is_virtual alone never rejects a license.

Use await client.activate(...), check(), validate() and deactivate(). Require result.valid and result.signatureValid before reading features. A browser-delivered UI must enforce paid server work on a trusted backend.

Floating licenses

Pro allows up to 10 concurrent sessions per software license; Business has no commercial platform seat cap. A separate software-license device allowance still applies. Activation may automatically reserve a seat; an activation token alone is not a lease. Await checkout(), heartbeat(), checkin() and close(). Explicit checkout raises AllSeatsInUseError; normal flows can return an invalid result. Always await graceful close and enforce the lease deadline.

Stop licensed work at signed lease expiry even if regular offline grace is longer. A process crash cannot send checkin; the server frees an expired session. Shared-seat contract.

Online usage credits

Business permits metered licenses. await client.consume(1, "export_job_123") verifies the receipt; getBalance() reads a current online balance. Catch InsufficientCreditsError and other CreditOperationError refusals. Normal feature checks never spend units.

Persist one idempotency key per billable job before sending. Recover an uncertain outcome with the same request key and operation, never a new key. Replays do not debit twice, but your application must also deduplicate execution of the actual job. A final successful charge may leave zero and authorize that charged operation only. Credit refunds return units, not money. Credit contract.

Offline and security boundaries

Regular licenses may use a verified cache only within signed deadlines, never beyond license expiry. Shared seats require an unexpired signed lease; metered permissions are online-only. An offline app cannot know about a new revocation until reconnecting. Do not log raw keys, tokens, hardware identifiers or customer payloads.

Require a valid, verified decision before features. A feature helper, token-presence property, HTTP 200 or successful deactivation alone grants no access. No hardware attestation, browser fingerprint fallback, unbreakable anti-piracy or universal OS certification is claimed.

Errors and recovery

FINGERPRINT_MISMATCH keeps access locked; contact the publisher for device recovery. HARDWARE_UNAVAILABLE means usable hardware information is unavailable; never replace it with a random ID fallback. ALL_SEATS_IN_USE asks the customer to close another app or release a stuck session. INSUFFICIENT_CREDITS denies the billable job. PLAN_UPGRADE_REQUIRED is a developer subscription limit, not a customer payment request.

Full error codes · Plan requirements · Compatibility · Customer portal.

License and distribution

The SDK is MIT licensed. Keep the copyright and permission notice when redistributing it; the hosted SaaS source is separate.

Complete example apps

Try Sudoku Studio or the original License Lab. Download and follow the steps.

Was this page helpful?

Choose an answer

Do not include personal data, license keys or credentials. Retained for up to 30 days. This is not a support inbox.

Search documentation

Arrow keys to move, Enter to open, Escape to close. Search stays in your browser.

Cookie settings