This guide walks you through displaying a clickwrap agreement to your users and verifying their consent on your backend. For a detailed overview of how the pieces fit together, see the Integration flow.
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.
Without initialization the SDK will not work and you will get an error when trying to request a clickwrap.
Call ClicktermDialog.show() to present the clickwrap to your user. The SDK:
Fetches the current effective template version from ClickTerm
Displays it in a modal dialog
Creates an event in ClickTerm once the end user accepts or declines
Returns a Signature to your application
The event remains unverified until your backend calls the verification endpoint.
example.js
ClicktermDialog.show({ endUserId: "user-123", // Your identifier for the end user clickwrapTemplateId: "YOUR_TEMPLATE_ID", // From the ClickTerm dashboard language: "en" // Optional — falls back to default language}).then((result) => { if (result.clicktermSignature) { // Send Signature to your backend for verification sendToBackend(result.clicktermSignature); } else if (result.isAlreadyAccepted) { // User already accepted the latest major version — no dialog was shown }}).catch((error) => { console.error("Clickwrap error:", error);});
The dialog only appears if the user hasn’t already accepted the latest major version. Requests to show a clickwrap are not counted toward billing.For the full list of parameters, result fields, and configuration options, see Displaying a clickwrap.
After the end user accepts or declines the clickwrap, the SDK creates an unverified event in ClickTerm and returns a Signature. Send this Signature to your server, then call ClickTerm’s verification endpoint with your App ID and App Key. This verifies the event — confirming the Signature hasn’t been forged or tampered with. For accepted events, a Certificate of Acceptance is generated.
The response contains clickwrapEventStatus ("ACCEPTED" or "DECLINED") along with the full event metadata (event ID, template version, timestamps, etc.).
ACCEPTED — The user accepted the terms. The event is now verified and a Certificate of Acceptance is generated.
DECLINED — The event is still verified, but no Certificate of Acceptance is generated. It’s up to your application to decide how to handle this (e.g., block the user journey or restrict features).
Requests to /clickwrap/verifyare counted toward billing. Implement rate
limiting or a Captcha check before this step to prevent abuse.
For full request/response details and framework-specific examples (Node.js, Python, Java), see Verifying a Signature.