
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@chekinapp/guest-sdk
Advanced tools
Framework-agnostic Chekin SDK for guest registration and check-in
The core framework-agnostic SDK package for integrating Chekin's guest registration and check-in platform into web applications through secure iframe embedding.
This package provides the foundational ChekinGuestSDK class that can be used in any JavaScript/TypeScript environment, regardless of framework. It handles iframe creation, secure communication via postMessage, configuration validation, and comprehensive logging.
Migrating from ChekinPro? See our comprehensive Migration Guide for step-by-step instructions to upgrade from the legacy ChekinPro SDK.
npm install @chekinapp/guest-sdk
import {ChekinGuestSDK} from '@chekinapp/guest-sdk';
const sdk = new ChekinGuestSDK({
apiKey: 'your-api-key',
reservationId: 'reservation-123',
mode: 'ALL',
autoHeight: true,
onHeightChanged: height => console.log(`Height: ${height}px`),
onGuestRegistered: guest => console.log('Guest registered:', guest),
});
// Render into a DOM element
await sdk.render('container-element-id');
// or
await sdk.render(document.getElementById('container'));
src/ChekinGuestSDK.ts)Main SDK class providing:
src/communication/)src/utils/)src/types/)new ChekinGuestSDK(config: ChekinGuestSDKConfig & { logger?: ChekinLoggerConfig })
| Method | Parameters | Returns | Description |
|---|---|---|---|
| render | container: string | HTMLElement | Promise<HTMLIFrameElement> | Renders the SDK iframe into the specified container. Accepts element ID (string) or HTMLElement reference |
| initialize | config: ChekinGuestSDKConfig | void | Initialize/update SDK configuration |
| initAndRender | config & {targetNode: string} | Promise<HTMLIFrameElement> | Initialize and render in one call (backward compatibility) |
| destroy | - | void | Destroys the SDK instance, removes iframe from DOM, and cleans up event listeners |
| unmount | - | void | Legacy method, same as destroy() |
| updateConfig | newConfig: Partial<ChekinGuestSDKConfig> | void | Updates SDK configuration and sends changes to iframe. Validates new config before applying |
| on | event: string, callback: ChekinEventCallback | void | Adds event listener for SDK events. Supports all SDK event types with type-safe callbacks |
| off | event: string, callback: ChekinEventCallback | void | Removes specific event listener. Must pass same callback reference used in on() |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| apiKey | string | ✅ | - | API key created in the Chekin dashboard |
| mode | string | ❌ | 'ALL' | SDK mode: 'ALL' (full functionality), 'ONLY_GUEST_FORM' (guest registration only), 'IV_ONLY' (identity verification only), 'PROPERTY_LINK' (property selection) |
| reservationId | string | ❌ | - | ID of specific reservation to pre-load in the SDK |
| externalId | string | ❌ | - | External ID for PMS integrations. If both reservationId and externalId are provided, externalId takes priority |
| guestId | string | ❌ | - | Specific guest ID. Can only be used in 'ONLY_GUEST_FORM' mode with reservationId or externalId |
| housingId | string | ❌ | - | ID of the particular housing/property. Required for 'PROPERTY_LINK' mode only |
| baseUrl | string | ❌ | - | Custom base URL for SDK hosting (for self-hosted deployments) |
| version | string | ❌ | - | Pin to specific SDK version (e.g., '1.6.2'). If not provided, uses latest version |
| defaultLanguage | string | ❌ | 'en' | Default interface language. Supported: 'en', 'es', 'el', 'uk', 'it', 'de', 'fr', 'hu', 'ru', 'cs', 'bg', 'pt', 'ro', 'et', 'pl', 'ca' |
| styles | string | ❌ | - | CSS styles injected into the SDK iframe for custom theming |
| stylesLink | string | ❌ | - | URL to external CSS stylesheet for advanced customization |
| autoHeight | boolean | ❌ | true | Automatically adjust iframe height based on content |
| enableLogging | boolean | ❌ | false | Enable SDK internal logging (logs are disabled by default) |
| prefillData | object | ❌ | - | Pre-fill guest form data to reduce manual entry |
| prefillData.guestForm | object | ❌ | - | Guest form pre-fill data (name, surname, email, etc.) |
| enableGuestsRemoval | boolean | ❌ | false | Allow guests to be removed from reservations |
| canEditReservationDetails | boolean | ❌ | true | Allow editing of reservation details |
| canShareRegistrationLink | boolean | ❌ | false | Enable sharing of registration links |
| routeSync | boolean | ❌ | false | Enable URL synchronization between parent and iframe |
| onHeightChanged | function | ❌ | - | Callback when iframe height changes. Receives (height: number) |
| onError | function | ❌ | - | Error callback. Receives (error: { message: string; code?: string }) |
| onConnectionError | function | ❌ | - | Connection/network error callback. Receives (error: any) |
| onGuestRegistered | function | ❌ | - | Callback when a guest completes registration. Receives guest data object |
| onAllGuestsRegistered | function | ❌ | - | Callback when all guests in a reservation complete registration |
| onReservationFound | function | ❌ | - | Callback when a reservation is successfully loaded |
| onReservationFetched | function | ❌ | - | Callback when reservation fetch completes (success or failure). Receives {isSuccess: boolean} |
| onReservationCreated | function | ❌ | - | Callback when a new reservation is created. Receives reservation object with ID |
| onReservationFoundFromHousing | function | ❌ | - | Callback when reservation is found via housing search. Receives reservation object |
| onIVFinished | function | ❌ | - | Callback when identity verification completes. Receives verification results |
| onScreenChanged | function | ❌ | - | Callback when screen/route changes in SDK. Receives screen information |
interface ChekinGuestSDKConfig {
// Required
apiKey: string;
// Optional Core Settings
baseUrl?: string;
version?: string;
mode?: 'ALL' | 'ONLY_GUEST_FORM' | 'IV_ONLY' | 'PROPERTY_LINK';
// Context
reservationId?: string;
externalId?: string;
housingId?: string;
guestId?: string;
defaultLanguage?: string;
// UI Customization
styles?: string;
stylesLink?: string;
autoHeight?: boolean;
prefillData?: {
guestForm?: {
name?: string;
surname?: string;
email?: string;
// ... other guest form fields
};
};
// Features
enableGuestsRemoval?: boolean;
canEditReservationDetails?: boolean;
canShareRegistrationLink?: boolean;
routeSync?: boolean;
// Advanced
enableLogging?: boolean;
// Event Callbacks
onHeightChanged?: (height: number) => void;
onError?: (error: {message: string; code?: string}) => void;
onConnectionError?: (error: any) => void;
onGuestRegistered?: (guest: Guest) => void;
onAllGuestsRegistered?: () => void;
onReservationFound?: () => void;
onReservationFetched?: (data: {isSuccess: boolean}) => void;
onReservationCreated?: (reservation: {id: string}) => void;
onReservationFoundFromHousing?: (reservation: {id: string}) => void;
onIVFinished?: (details: IdentityVerificationDetails) => void;
onScreenChanged?: (data: any) => void;
}
Basic Configuration:
{
apiKey: 'pk_live_your_api_key',
reservationId: 'reservation-123',
mode: 'ALL',
defaultLanguage: 'en'
}
Advanced Configuration:
{
apiKey: 'pk_live_your_api_key',
version: '1.6.2',
reservationId: 'reservation-123',
mode: 'ALL',
defaultLanguage: 'es',
styles: `
.primary-button { background: #007cba; }
.container { max-width: 800px; }
`,
autoHeight: true,
enableLogging: true,
prefillData: {
guestForm: {
name: 'John',
surname: 'Doe',
email: 'john@example.com'
}
},
onHeightChanged: (height) => console.log(`Height: ${height}px`),
onError: (error) => console.error('SDK Error:', error),
onGuestRegistered: (guest) => console.log('Guest registered:', guest)
}
The SDK emits the following events:
chekin:height-changed - Iframe content height changeschekin:error - Error occurs in SDK or iframechekin:connection-error - Network or communication errorchekin:guest-registered - Guest completes registrationchekin:all-guests-registered - All guests complete registrationchekin:reservation-found - Reservation successfully loadedchekin:reservation-fetched - Reservation fetch completeschekin:iv-finished - Identity verification completeschekin:screen-changed - Screen/route changessdk.on('chekin:height-changed', height => {
document.getElementById('container').style.height = `${height}px`;
});
sdk.on('chekin:error', error => {
console.error('SDK Error:', error.message);
// Handle error appropriately
});
sdk.on('chekin:guest-registered', guest => {
console.log('Guest registered:', guest.name, guest.surname);
});
// Update configuration after initialization
sdk.updateConfig({
reservationId: 'new-reservation-456',
styles: 'body { background: #f5f5f5; }',
enableLogging: true,
});
<div id="chekin-container"></div>
<script>
const sdk = new ChekinGuestSDK({
apiKey: 'your-key',
reservationId: 'reservation-123',
mode: 'ALL',
});
sdk.render('chekin-container');
</script>
<template>
<div ref="container" class="chekin-container"></div>
</template>
<script>
import {ChekinGuestSDK} from '@chekinapp/guest-sdk';
export default {
mounted() {
this.sdk = new ChekinGuestSDK({
apiKey: 'your-key',
reservationId: 'reservation-123',
mode: 'ALL',
});
this.sdk.render(this.$refs.container);
},
beforeUnmount() {
this.sdk?.destroy();
},
};
</script>
import {Component, ElementRef, ViewChild, OnInit, OnDestroy} from '@angular/core';
import {ChekinGuestSDK} from '@chekinapp/guest-sdk';
@Component({
template: '<div #container class="chekin-container"></div>',
})
export class ChekinComponent implements OnInit, OnDestroy {
@ViewChild('container', {static: true}) container!: ElementRef;
private sdk!: ChekinGuestSDK;
ngOnInit() {
this.sdk = new ChekinGuestSDK({
apiKey: 'your-key',
reservationId: 'reservation-123',
mode: 'ALL',
});
this.sdk.render(this.container.nativeElement);
}
ngOnDestroy() {
this.sdk?.destroy();
}
}
# Build the package
npm run build
# Development mode with watching
npm run dev
The core package includes comprehensive tests for all functionality. Use the sandbox.html file for manual testing during development.
FAQs
Framework-agnostic Chekin SDK for guest registration and check-in
We found that @chekinapp/guest-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.