Skip to main content
ClicktermDialog controls the clickwrap consent dialog shown to end users. It provides methods to show a clickwrap for acceptance and to display previously accepted content.

Access

const { ClicktermDialog } = window.Clickterm;

Methods

show

Displays a clickwrap dialog to the end user. If the user has already accepted the latest effective major version, the promise resolves immediately without showing the dialog.
ClicktermDialog.show(options, config?)
Parameters:
ParameterTypeRequiredDescription
optionsShowOptionsYesDialog options (see below)
configDialogConfigNoDialog configuration (see below)
ShowOptions:
FieldTypeRequiredDescription
endUserIdstringYesYour identifier for the end user (max 256 chars)
clickwrapTemplateIdstringYesTemplate ID from the ClickTerm dashboard
templatePlaceholdersobjectNoKey-value pairs for placeholder substitution
languagestringNoLanguage code (e.g., "en", "de"). Falls back to the configured default
DialogConfig:
FieldTypeDefaultDescription
disableClosebooleanfalsePrevent the user from closing the dialog without accepting
Returns: Promise<ShowResult> The result object contains the Signature that should be sent to your backend for verification. Example:
ClicktermDialog.show({
  endUserId: "user-123",
  clickwrapTemplateId: "YOUR_TEMPLATE_ID",
  templatePlaceholders: {
    fullName: "Alice Example",
    email: "[email protected]",
    company: "Acme Corp",
  },
  language: "en",
}, {
  disableClose: true,
}).then((result) => {
  // Send result.clicktermSignature (the Signature) to your backend
  console.log("Signature:", result.clicktermSignature);
}).catch((error) => {
  console.error("Error:", error);
});
Requests to show a clickwrap are not counted toward billing. Only the verification step (POST /clickwrap/verify) is billed.

showAcceptedContent

Displays the previously accepted clickwrap content to the user. Use this when you want to let users review what they agreed to.
ClicktermDialog.showAcceptedContent(options)
Parameters:
FieldTypeRequiredDescription
endUserIdstringYesThe end user identifier
clickwrapTemplateIdstringYesTemplate ID
Returns: Promise<AcceptedContentResult> Example:
ClicktermDialog.showAcceptedContent({
  endUserId: "user-123",
  clickwrapTemplateId: "YOUR_TEMPLATE_ID",
}).then((result) => {
  console.log("Accepted content:", result);
}).catch((error) => {
  console.error("Error:", error);
});
The accepted content dialog only appears if the user has an accepted and verified event.