Prerequisites: SDK v2.2.0+ installed, a published template with an effective version, and your App ID.
ClicktermDom.renderInline() to embed a clickwrap agreement as a checkbox directly in your page. Unlike dialog mode (which shows a modal overlay), inline mode gives you full control over where the checkbox appears and when the agreement is submitted.
Integration flow
When to use inline mode
| Inline | Dialog | |
|---|---|---|
| UI | Checkbox embedded in your page | Full-screen modal overlay |
| Submission | You call finalize() when ready (e.g., on form submit) | User clicks Accept/Decline in the modal |
| Multiple on one page | Yes | One modal at a time |
| Best for | Registration forms, checkouts, multi-consent flows | Standalone consent screens, blocking prompts |
Basic usage
Step-by-step
Prepare a container
Add an empty element with a unique The container must exist in the DOM when
id where the checkbox should appear:renderInline() is called and must not already have another inline clickwrap rendered in it.Render the inline clickwrap
Call The SDK fetches the agreement content, renders a checkbox + text inside a Shadow DOM in your container, and returns a handle.
ClicktermDom.renderInline() with the container ID, request parameters, and optional callbacks:Use the onChange callback
The
onChange callback fires every time the checkbox state changes. Use it to enable or disable your submit button:Finalize on form submit
When the user submits your form, call
finalize() on the handle. This locks the checkbox, reads its state, and sends the confirmation to ClickTerm:Verify on your backend
Send the Signature to your server and call the ClickTerm verification endpoint. This step is the same as dialog mode — see Verifying a Signature for full details.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
containerId | string | Yes | The id of the HTML element to render into |
endUserId | string | Yes | Your identifier for the end user (max 256 chars) |
clickwrapTemplateId | string | Yes | Template ID from the ClickTerm dashboard |
language | string | No | Language code (e.g., "en", "de"). See supported languages |
templatePlaceholders | object | No | Key-value pairs for placeholder substitution |
Options
| Field | Type | Description |
|---|---|---|
onChange | (checked: boolean) => void | Called every time the checkbox state changes |
style | object | Visual customization — see ClicktermDom styling reference |
Result format
Thefinalize() method returns a ClicktermInlineFinalizeResult:
| Field | Type | Description |
|---|---|---|
status | string | UNVERIFIED — verify the Signature server-side. ALREADY_ACCEPTED — user already accepted. ERROR — submission failed |
clicktermSignature | string | null | The Signature to send to your backend for verification. null if not available |
submittedStatus | string | What was sent: ACCEPTED (checked) or DECLINED (unchecked) |
error | Error | Present only when status is ERROR |
Requests to render an inline clickwrap are not counted toward billing. Only
the verification step (
POST /clickwrap/verify) is billed.Handle types
Depending on the backend response,renderInline() may return different handle types:
Normal case
The user has not accepted yet. A checkbox and agreement text are rendered in the container.Already accepted
The user already accepted this template in a previous session. No UI is rendered in the container.Existing signature
The backend has a signature from a different flow. No UI is rendered in the container.Handling all cases
Multiple inline clickwraps
You can render multiple independent inline clickwraps on the same page. Each needs its own container andrenderInline() call.
Finalizing all at once
Instead of callingfinalize() on each handle, use finalizeAll():
Error handling
WraprenderInline() in try/catch. All errors are instances of ClickwrapError:
| Error | Cause | Fix |
|---|---|---|
| Container element not found | No element with that ID in the DOM | Ensure the element exists before calling renderInline() |
| Already rendered for container | renderInline() called twice for the same container | Call handle.destroy() first, or use a different container |
| Missing inline content | Backend returned content without the inlineContent field | Check your template configuration — make sure inline content is set |
| Client not initialized | ClicktermClient.initialize() was not called | Call initialize() before any render calls |
status: 'ERROR' and the checkbox is automatically unlocked for retry.
Full working example
A registration form with two inline clickwraps:Next steps
Verifying a Signature
Verify the user’s action on your backend.
ClicktermDom API
Full API reference, styling options, and type definitions.
Template placeholders
Pass dynamic data into the agreement text.
Dialog mode
Use the modal dialog approach instead.

