Skip to content
App builder · v0

Add e-signatures to your v0 app

You generated the app with v0 and now people have to agree to your terms before they get in. One prompt adds the signing flow to the UI v0 built, with the rules from Esign Comply and an independent record of each signature.

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

One prompt, from paste to record
  1. 01
    Add a test key to the project's secretsYou
  2. 02
    Paste one prompt into v0You
  3. 03
    v0 builds the page and the server codeYou
  4. 04
    Acceptance reported from the user's browserEsign Comply
  5. 05
    Sealed record, receipt and timestampEsign Comply
  6. 06
    Server confirms, then creates the accountYou
Copy-paste prompt

The prompt to paste into v0

Open your project in v0 and paste this into the chat. It builds a signup clickwrap: your Terms of Service and Privacy Notice, accepted with your own checkbox and your own button.

What the prompt tells v0
  • Read setup.md, auth.md and llms.txt before writing anything.
  • Create the session on your server with the secret key, and send only the client token to the browser.
  • Attach the browser SDK to your own checkbox and button. No widget, no iframe.
  • Confirm the record on your server before the account exists.
  • Never invent an API method, and stop and ask when something conflicts.
Generate the prompt for your regions
Prompt for v0
Add a signup clickwrap to this app with Esign Comply. The signup form gets an unchecked checkbox, links to the Terms of Service and the Privacy Notice, and one Create account button. We keep the UI. Esign Comply keeps the independent record of each acceptance.

Read first, and follow exactly:
- https://esigncomply.com/setup.md
- https://esigncomply.com/auth.md
- https://esigncomply.com/llms.txt

Build
1. A route handler or server action that creates the session with the secret key from ESIGNCOMPLY_API_KEY. It returns only the client token and the document version IDs.
2. The signup form as a client component: attach @esigncomply/browser with the client token to the form's own checkbox and button, and call complete() from the user's real click.
3. A server confirmation that reads the record with the secret key before the account is created.

Rules
- Ask me to add ESIGNCOMPLY_API_KEY as an environment variable in the project settings, with no NEXT_PUBLIC_ prefix. Never put a key in generated code.
- Never import the server package in a client component.
- Never invent API methods, packages or legal wording. If the docs do not cover a step, or it conflicts with the app, stop and ask.
- Never pre-check the box or submit for the user.

Ask me to run npx esigncomply check --url against the preview or a local copy and paste the output back. Keep these rules in the project's instructions.
5 steps

How to run it in v0

v0 is Vercel's AI app builder. This is the whole run, from a new Esign Comply account to your first test record.

  1. 01
    Create a free account and a test keySign up, then choose Create test key in the dashboard. The key starts with esc_test_ and is shown once. The Free plan needs no card, and test mode needs no registered domain.
  2. 02
    Add the key as an environment variableIn your v0 project settings, add ESIGNCOMPLY_API_KEY with no NEXT_PUBLIC_ prefix. A variable with that prefix is compiled into the browser bundle. Do not paste the key into the chat.
  3. 03
    Paste the prompt into v0v0 adds a route handler or server action that creates the session, turns the signup form into a client component with the SDK attached, and adds the server confirmation.
  4. 04
    Add your preview host to your test originsTest keys work on localhost with no setup. A hosted preview runs on its own host, so list that host under Domains, Test origins in the Esign Comply dashboard. If a call returns domain_mismatch, the message names the origin to add.
  5. 05
    Tick the box, then run the checkOpen the preview, tick the checkbox and click Create account. Then run npx esigncomply check --url against the preview or a local copy and paste the output back into v0.
The 60-second result

What you have 60 seconds after v0 finishes

Open the preview and sign up once. This is what v0 added to the project, and the record Esign Comply holds a minute later.

  1. 01

    The server route that creates the session

    e.g. app/api/ceremony/route.ts

    It holds the secret key, pins the current version of each document and hands the browser a short-lived client token.

  2. 02

    Your signup form, with the SDK attached

    e.g. app/signup/signup-form.tsx

    Your markup and your styles. The SDK renders nothing: it watches your links, your checkbox and your button, and reports what the user did.

  3. 03

    The server confirmation

    e.g. app/api/signup/confirm/route.ts

    The record ID came from the browser, so the server reads the record with the secret key before the account exists.

// app/api/ceremony/route.ts
import { esc } from "@/lib/esigncomply";

export async function POST(request: Request) {
  const { signerId, email, attempt } = await request.json();

  const { data: session, error } = await esc.sessions.create(
    {
      profile: "prof_signup_4f1a",
      signer: {
        external_id: signerId,
        email,
        class: "consumer",
        country: "US",
      },
      documents: [
        { document: "doc_8Hq2", version: "current" }, // Terms of Service
        { document: "doc_Pv71", version: "current" }, // Privacy Notice
      ],
      context: {
        url: "http://localhost:3000/signup",
        locale: "en-US",
        purpose: "account_signup",
      },
    },
    { idempotencyKey: `signup-${signerId}-${attempt}` },
  );
  if (error) return Response.json({ error: error.code }, { status: 502 });

  // Save signerId and the pinned version IDs in server-owned state.
  return Response.json({
    clientToken: session.client_token,
    documents: session.documents,
  });
}

The example is written as Next.js route handlers. In v0, the two server parts are server routes or backend functions that make the same two calls.

The record that appears

One sealed test record, kept by Esign Comply

Recordrec_Z4m8
simple · L1
RecordedWritten durably, receipt signed with ES256
TimestampedExternal RFC 3161 token over the record hash
AnchoredPublic anchor pending
Checkbox changed by a trusted user eventobserved
Terms of Service, version dv_3kT9observed
Server time 2026-11-21T15:03:20.291Zobserved
Signer email dana@example.orgasserted
record_hash sha256:5be7…example record

Your first test record opens in the dashboard with what was observed, what was asserted, and the conformance findings. It is sealed like a live record, on a separate test ledger, and its evidence report is watermarked TEST.

What v0 gets right with the rules, and wrong without them

The cleanest version of a signup form hides the notice: small, gray, out of the way. The prompt tells v0 which parts of the form the rules measure, so the design stays clean and the notice stays readable.

CR-01block

Affirmative assent control

Without the rules

The checkbox ships already ticked, or a handler ticks it for the user to save a click.

With the prompt

The box renders unchecked and only a real user event changes it. The SDK records its state at load, and the check reports a pre-checked box or a scripted click at block level.

CR-02block

Notice text names every document

Without the rules

One generic line, "By signing up, you agree to our terms", with no document titles and no links.

With the prompt

The notice carries the registered title of every document in the session, each one linked, inside the same container as the checkbox and the button.

CR-04block

Notice and control in the same viewport

Without the rules

The agreement line sits in the footer or under a long form, below the fold on a phone.

With the prompt

The notice sits directly above the button in the same container. The SDK records both positions at the signing act, and the check runs your page at 390 by 844.

CR-05warn

Document link contrast

Without the rules

Links to the terms styled to match the sentence around them, because it looked cleaner.

With the prompt

Document links are underlined and differ in colour from the surrounding text by at least 3 to 1. The check prints the ratio it measured.

CR-06warn

Notice font size and contrast

Without the rules

Fine print: 10 px, light gray, tucked under a bright button.

With the prompt

The notice is set at body size, never under 12 px, with contrast of at least 4.5 to 1 against its background. The SDK measures both.

Each row is a real conformance rule with its ID and its default level. Esign Comply runs 28 of them over your test records, and every finding names the rule, the measurement and the fix.

Go further with v0

Your v0 app already has the UI. Add the next signing flow with the same split: v0 builds the screen, Esign Comply keeps the record.

A whole product

Build your own signing app

Upload a document, email each signer a link to your own application and collect the signatures there. There are 7 build guides, each with the steps and the code.

Build your own DocuSign
Your stack

Stack guides

The same integration written out for your framework and your host, with working code for the server, the browser and the confirmation.

Browse the stack guides
Live demos

Use cases

NDAs, contractor agreements, consent forms, order forms and terms updates. Each page has a live demo you can sign in test mode.

See the use cases
Prompt generator

The exact rules for your regions

Pick your use case, regions, signer types and stack. You get one prompt to paste into v0, with your own document and profile IDs and the rule packs you selected.

Generate a prompt

Questions about v0 and e-signatures

Can v0 add e-signatures to an app it generated?

Yes. Paste the prompt on this page into your v0 project. It adds a server route that creates the Esign Comply session, attaches the browser SDK to the checkbox and button in the form v0 built, and confirms the record on the server before the account is created.

Where do I put the API key in v0?

In the project's environment variables, under the name ESIGNCOMPLY_API_KEY and without a NEXT_PUBLIC_ prefix. Only route handlers and server actions read it. The prompt tells v0 to ask you to add it there and never to put a key in generated code.

Guide for AI app builders

Do test keys work on a v0 preview?

Yes, once the preview host is on your list. Test keys work on localhost with no setup, and on preview hosts you add under Domains, Test origins in the Esign Comply dashboard. A call from an unlisted host returns domain_mismatch and names the origin to add.

How test mode works

How do I run the conformance check on a v0 app?

Run npx esigncomply check --url against the preview or a local copy of the app and paste the output back into v0. The findings are also listed on the test record in the Esign Comply dashboard, where Copy for AI produces them as Markdown.

Read the conformance rules

Is there a guide for the stack a v0 app runs on?

Yes. The Next.js guide in the docs builds signup acceptance and NDA signing in a Next.js App Router application, with the server module, the session, the form, the server confirmation and the webhook, each as working code.

Read the Next.js guide

Keep the UI v0 built. Leave the record to us.

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

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

Working with an AI tool? This page is also available as Markdown: /build/v0.md