# Build your own clickwrap

> Build your own clickwrap with Cursor or Claude Code: signup, checkout and terms updates in your own form. A clickwrap alternative with an independent record.

Source: https://esigncomply.com/build/clickwrap

Build guide · clickwrap

You're adding an "I agree" checkbox to signup, checkout or a terms update, and you want it in your own form instead of someone's embed. Vibe code the clickwrap in your UI, and Esign Comply gives your AI tool the rules for the notice, the checkbox and the button, and keeps the independent record of each acceptance.

[Get started](https://esigncomply.com/signup) · [Generate a prompt](https://esigncomply.com/product/prompt-generator)

Free plan: 10 live signatures a month and a full test mode. No card required.

The flow, and who does each part

1. Publish your terms as versions · You
2. Render your own checkbox and button · You
3. User ticks the box and clicks · You
4. Acceptance reported from the user's browser · Esign Comply
5. Sealed record pinned to the terms version · Esign Comply
6. Server confirms, then creates the account · You

## What you're building: clickwrap in three places

The three places a clickwrap lives, and the plumbing that keeps track of who accepted what.

### Signup clickwrap

A checkbox and a Create account button, with your terms and privacy notice linked beside them.

### Checkout terms

Acceptance of your terms of sale on the same screen as Place order.

### Terms update screen

Signed-in users accept the new version before they continue.

### Versioned terms

Every version of every document, dated, stored and never overwritten.

### Acceptance lookup

For any user: which version they accepted, when and on which screen.

### Your own markup

A native checkbox in your form, styled by your CSS. No embed and no iframe.

### Records you can export

A report per acceptance for the day a customer disputes a charge or a clause.

You vibe code · Esign Comply handles

## Who does what in your clickwrap

The form is yours, down to the checkbox. Esign Comply supplies the rules for it, watches the click from the user's browser and holds the record.

### Terms and versions

You vibe code

Writing your terms, and publishing a new version when they change.

Esign Comply handles

Stores each version as immutable text with a hash and an effective date. Every record pins the version it covers.

### The checkbox and the button

You vibe code

Your own form markup: notice text, links, an unchecked checkbox, one button.

Esign Comply handles

The rules prompt for wording and layout, and the browser SDK that observes the checkbox and the click.

### Signup and checkout logic

You vibe code

Creating the account or taking the payment, after the server check.

Esign Comply handles

`GET /v1/records/{id}` and the signed `record.completed` webhook to confirm the acceptance first.

### Terms updates

You vibe code

The blocking screen and the notice email to your users.

Esign Comply handles

`GET /v1/signers/{external_id}/status`, which tells your server whether a user still has a version to accept.

### Acceptance lookup

You vibe code

The admin screen inside your product.

Esign Comply handles

The record ID and receipt for every acceptance, plus an evidence report and a public verification page.

### The record

You vibe code

Our receipt in your users table.

Esign Comply handles

The sealed record, a signed receipt (ES256), an RFC 3161 timestamp and a hash-chained ledger.

### Copies to the user

You vibe code

Your own welcome and order emails.

Esign Comply handles

An optional emailed receipt to the user with a copy of what they accepted.

8 steps

## How to build your clickwrap, step by step

Eight steps, and no document upload: your terms go in as text, and the form you already have stays.

1. **Generate the prompt**

   In the Esign Comply dashboard, pick signup, checkout or terms update, your regions, your signer types and your stack. The prompt gives your AI tool the notice wording, the layout rules and the SDK calls for your form.

   Prompt generator

   ```
   Use cases   Signup, checkout, terms update
   Method      Checkbox and button
   Assurance   L1
   Signers     Consumer and business
   Stack       Next.js on Vercel, Supabase
   ```

2. **Publish your terms as document versions**

   There is nothing to upload: send each document as Markdown, HTML or plain text and Esign Comply stores it as an immutable, hashed version. Set `material_change` when existing users have to accept again.

   Server · publish a version

   ```
   POST /v1/documents/doc_8Hq2/versions
   Idempotency-Key: tos-2026-11-21

   {
     "version_label": "2026-11-21",
     "effective_at": "2026-12-01T00:00:00Z",
     "content": { "format": "markdown", "text": "# Terms of Service\n..." },
     "material_change": true,
     "summary_of_changes": "Added arbitration clause in section 14."
   }
   ```

3. **Create one session per person**

   Your server creates a session when the form is ready, for one person and up to 10 documents. Terms of Service and Privacy Notice accepted together are one session, one record and one event.

   Server · app/api/ceremony/route.ts

   ```ts
   // One session per person. Several documents can ride in one session.
   // esc is the server SDK: new EsignComply(process.env.ESIGNCOMPLY_API_KEY)
   const { data: session, error } = await esc.sessions.create(
     {
       profile: "prof_signup_4f1a", // checkbox, L1
       signer: {
         external_id: user.id, email: user.email,
         class: "consumer", country: user.country,
       },
       documents: [
         { document: "doc_8Hq2", version: "current" }, // Terms of Service
         { document: "doc_Pv71", version: "current" }, // Privacy Notice
       ],
       context: {
         url: `${origin}/signup`,
         locale: "en-US",
         purpose: "account_signup",
       },
       metadata: { plan: "pro" },
     },
     { idempotencyKey: `signup-${user.id}-${attempt}` },
   );
   // Send the browser only session.client_token, session.api_url
   // and session.documents.
   ```

4. **Give each document a page on your domain**

   A clickwrap has no invitation email: the user is already on your form. What they need is a link to each document, so serve every version at a stable page that renders the registered text unmodified.

   Server · app/legal/\[slug\]/page.tsx

   ```tsx
   const { data, error } = await esc.documents.versions.getContent(
     documentId,
     v ?? "current",
   );
   if (error || !data?.html) notFound();

   return (
     <article
       data-esc-document={data.version_id}
       lang={data.language}
       dangerouslySetInnerHTML={{ __html: data.html }}
     />
   );
   ```

5. **Attach the browser SDK to your own checkbox and button**

   `@esigncomply/browser` watches the links, the checkbox and the button you rendered, and reports the acceptance from the user's browser. The checkbox starts unchecked and the user ticks it.

   Browser · app/signup/signup-form.tsx

   ```tsx
   import { EsignComply } from "@esigncomply/browser";

   const ceremony = await EsignComply.attach({ clientToken, apiUrl });

   await ceremony.presentDocument({
     versionId: documents[0].version_id,
     mode: "hyperlink",
     link: tosLink,
   });
   await ceremony.presentDocument({
     versionId: documents[1].version_id,
     mode: "hyperlink",
     link: privacyLink,
   });

   ceremony.observeAssent({
     region: assent, // notice text, links, checkbox, button
     checkbox: agree,
     submit: createAccount,
   });

   // From your real submit handler
   const result = await ceremony.complete();
   // { recordId, receipt, verifyUrl, status }
   ```

6. **Confirm on your server before you create the account**

   Create the account, or take the payment, only after your server has read `GET /v1/records/{id}` with the secret key or handled the signed `record.completed` webhook.

   Server · confirm, then create the account

   ```
   const { data: record, error } = await esc.records.get(recordId);
   const actual = record?.documents.map((d) => d.version_id).sort();

   const confirmed =
     !error &&
     ["recorded", "timestamped", "anchored"].includes(record.status) &&
     record.signer.external_id === signerId &&
     actual.join() === [...expectedVersionIds].sort().join() &&
     record.livemode === (process.env.VERCEL_ENV === "production");

   if (confirmed) {
     await createAccount(form, record.id, record.receipt);
   }
   ```

7. **Ask again when your terms change**

   After you publish a version with `material_change`, your server asks for each signed-in user whether a version is outstanding, and sends those users to a blocking screen that runs the same ceremony. Email your own notice about the change with a provider such as Resend.

   Server · gate for signed-in users

   ```
   GET /v1/signers/user_7c1d/status

   // In your authenticated layout
   const { data } = await esc.signers.status(user.signerId);
   if (data.documents.some((d) => d.outstanding)) {
     redirect("/accept-updates");
   }
   ```

8. **Show acceptances in your admin, keep our receipt**

   Store the record ID and the signed receipt on the user. Your admin screen lists what each user accepted and links the public verification page, with a button to download the evidence report.

   Server · evidence for one acceptance

   ```
   // Use a key with full_access or read_only permission
   GET /v1/records/rec_Z4m8/report      // evidence report (PDF)
   GET /v1/records/rec_Z4m8/evidence    // evidence package (ZIP)

   // Anyone checks the package offline
   npx esigncomply-verify rec_Z4m8.zip
   ```

[Read the quickstart](https://esigncomply.com/docs/quickstart) · [Browser SDK reference](https://esigncomply.com/docs/sdk/browser) · [Moving off Ironclad Clickwrap? Read the migration guide](https://esigncomply.com/migrate/ironclad-clickwrap)

For Cursor, Claude Code, Lovable

## A starter prompt to paste into your AI tool

Paste this first. It names the three flows and points your AI tool at the docs. Then paste the generated prompt from the dashboard.

[Generate the full prompt](https://esigncomply.com/product/prompt-generator)

`starter-prompt.md`

```markdown
Add clickwrap acceptance to this app in three places, built into our own forms.

1. Signup: an unchecked checkbox and the Create account button, with links to our Terms of Service and Privacy Notice.
2. Checkout: acceptance of our Terms of Sale beside the Place order button.
3. Terms update: a blocking screen for signed-in users who have not accepted the current version, with Accept and continue and Log out.

Use our existing form components and styles: no iframe, no third-party widget. Add an admin page listing what each user accepted, which version and when.

Use Esign Comply for the signing ceremony and the record. First read and follow https://esigncomply.com/setup.md and https://esigncomply.com/llms.txt. Never invent API methods, endpoints or parameters: if the docs do not cover it, stop and ask me.

Never write or change our legal text: render the registered versions fetched from Esign Comply. Never pre-check a box or submit for the user. Create the account or take the payment only after our server has confirmed the record.

Next I will paste the prompt generated in the Esign Comply dashboard. It has the exact rules for the signing screen and overrides this message.
```

The record

## Why not build the record yourself

A clickwrap you built yourself usually ends as a boolean and a timestamp in your users table. That works until a customer disputes a charge or an arbitration clause, and the only evidence is a row that you, the other party, could have written at any time. Esign Comply receives the click from the user's browser, pins it to the exact terms version by hash, seals it with keys you do not hold and has an outside authority timestamp it (RFC 3161). Keep your boolean, and store our receipt next to it.

[Why the record should not be yours](https://esigncomply.com/why)

Annual, per domain

## Pricing in one line

The Free plan includes 10 live signatures a month and a full test mode, with no card. Starter is $200 per year for 2,000 live signature events, Unlimited is $1,200 per year, and Enterprise starts at $10,000 per year. One event is one person's completed acceptance, and up to 10 documents accepted together count once: Terms of Service plus Privacy Notice at signup is one event.

[See pricing](https://esigncomply.com/pricing)

## Questions about building your own clickwrap

### Can I build my own clickwrap with Cursor or Claude Code?

Yes. A clickwrap is a checkbox, a notice and a button in a form you already have. Esign Comply generates one prompt with the wording and layout rules for your stack, your AI tool wires the browser SDK to your own elements, and a conformance check over your test records shows what to fix before you go live.

[Generate a prompt](https://esigncomply.com/product/prompt-generator)

### How do I move off a clickwrap tool like Ironclad Clickwrap?

Publish your current terms as document versions, replace the embed with your own markup plus the Esign Comply browser SDK, run test ceremonies, then switch to live keys. Keep the export of your old acceptance history with your records. The migration guide walks through each step.

[Ironclad Clickwrap migration guide](https://esigncomply.com/migrate/ironclad-clickwrap)

### Where do my terms live?

You publish them to Esign Comply as text through the API: Markdown, HTML or plain text. Each version is immutable and hashed, and your own pages render the registered text, so the record names exactly what the user was shown.

### What happens when my terms change?

Publish a new version and mark it as a material change. GET /v1/signers/{external_id}/status then tells your server whether a user still has to accept, and your app shows that user a blocking screen that runs the same ceremony. Earlier records stay on file, each pinned to the version that user accepted.

[Re-acceptance guide](https://esigncomply.com/docs/guides/reacceptance)

### Is a clickwrap in my own form recognized?

Yes. Electronic signatures are recognized under the U.S. ESIGN Act and state UETA laws: a signature cannot be denied legal effect just because it is electronic. The rules Esign Comply gives your AI tool for the notice, the checkbox and the button are drawn from those laws and from leading U.S. online-assent decisions, and every acceptance is kept as an independent, tamper-evident record.

[U.S. rules we draw on](https://esigncomply.com/compliance/united-states)

### More build guides

- [Build your own DocuSign](https://esigncomply.com/build/docusign-alternative)
- [Build your own Dropbox Sign](https://esigncomply.com/build/dropbox-sign-alternative)
- [Build your own PandaDoc](https://esigncomply.com/build/pandadoc-alternative)
- [Build your own Adobe Acrobat Sign](https://esigncomply.com/build/adobe-sign-alternative)
- [Build your own signNow](https://esigncomply.com/build/signnow-alternative)
- [Build your own DocSend](https://esigncomply.com/build/docsend-alternative)
- [All build guides](https://esigncomply.com/build)

### A copy-paste prompt for your AI tool

- [Cursor](https://esigncomply.com/build/cursor)
- [Claude Code](https://esigncomply.com/build/claude-code)
- [Codex](https://esigncomply.com/build/codex)
- [Windsurf](https://esigncomply.com/build/windsurf)
- [GitHub Copilot](https://esigncomply.com/build/github-copilot)
- [Devin](https://esigncomply.com/build/devin)
- [Lovable](https://esigncomply.com/build/lovable)
- [v0](https://esigncomply.com/build/v0)
- [Bolt](https://esigncomply.com/build/bolt)
- [Replit](https://esigncomply.com/build/replit)
- [ChatGPT](https://esigncomply.com/build/chatgpt)
- [Grok](https://esigncomply.com/build/grok)
- [Grokbot](https://esigncomply.com/build/grokbot)
- [Muse](https://esigncomply.com/build/muse)
- [All AI tools](https://esigncomply.com/build#tools)

## Build the clickwrap. Leave the record to us.

[Get started](https://esigncomply.com/signup) · [Documentation](https://esigncomply.com/docs)

Free plan: 10 live signatures a month and a full test mode. No card required.

Ironclad is a trademark of its owner. Esign Comply is not affiliated with it.

---

Every page on esigncomply.com has a Markdown version at the same URL plus `.md` (the home page is `https://esigncomply.com/index.md`). https://esigncomply.com/llms.txt lists them.
