Skip to main content
The ClickTerm Web SDK lets you display clickwrap agreements to end users in your web application. It’s distributed as an npm package (@clickterm/widget) and as a single JavaScript file loaded via a script tag.
Latest SDK versions: Web 2.3.0 · Android 2.2.0 · React Native 0.3.0View changelog

Installation

npm install @clickterm/widget
Then import the SDK in your code:
import { ClicktermClient, ClicktermDialog, ClicktermDom } from "@clickterm/widget";
The package ships ESM and CJS builds with bundled TypeScript types.
Both distributions contain the same SDK. Code samples in these docs use the window.Clickterm global — if you installed from npm, replace that line with the import above.

Initialization

Initialize the SDK with your App ID:
const { ClicktermClient, ClicktermDialog } = window.Clickterm;
ClicktermClient.initialize("YOUR_CLICKTERM_APP_ID");
Get your App ID from the Integrations page in the ClickTerm Dashboard.
Never expose your App Key in client-side code. The App Key is used only for backend verification calls. The client SDK uses only the App ID. Store the App Key safely — it won’t display again after creation, but can be regenerated. Regenerating the key requires updating your backend configuration.

Verify initialization

After calling initialize(), you can immediately use ClicktermDialog methods. Without initialization, the SDK will throw an error when requesting a clickwrap.
// Full setup example
const { ClicktermClient, ClicktermDialog } = window.Clickterm;
ClicktermClient.initialize("YOUR_CLICKTERM_APP_ID");

// Now you can show clickwraps (dialog mode)
ClicktermDialog.show({
  endUserId: "user-123",
  clickwrapTemplateId: "YOUR_TEMPLATE_ID",
}).then((result) => {
  console.log("Result:", result);
});

// Or use inline mode (SDK v2.2.0+)
// See ClicktermDom for details

Requirements

  • The template must be Enabled in the dashboard
  • The template must have at least one published content version in the Effective state

Next steps

ClicktermClient

Client initialization and configuration.

ClicktermDialog

Showing clickwrap dialogs and accepted content.

ClicktermDom

Inline clickwrap rendering (v2.2.0+).