Have Devin build your e-signature flow
You assign Devin a task and review what comes back. Assign this one: a signup clickwrap in your own UI, built to the rules Esign Comply supplies, with an independent record of every acceptance and one pull request to review.
Free plan: 10 live signatures a month and a full test mode. No card required.
- 01Put a test key in your server environmentYou
- 02Paste one prompt into DevinYou
- 03Devin wires your form and your serverYou
- 04Acceptance reported from the user's browserEsign Comply
- 05Sealed record, receipt and timestampEsign Comply
- 06Server confirms, then creates the accountYou
The prompt to paste into Devin
Paste this as the task you give Devin, with your repository attached. It builds a signup clickwrap: your Terms of Service and Privacy Notice, accepted with your own checkbox and your own button.
- Read
setup.md,auth.mdandllms.txtbefore 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.
Task: add a signup clickwrap to this repository with Esign Comply and open one pull request. What it does: a new user accepts our Terms of Service and Privacy Notice with our own unchecked checkbox and our own Create account button. The account is created only after our server has confirmed the record with Esign Comply. Read first and follow exactly: - https://esigncomply.com/setup.md - https://esigncomply.com/auth.md - https://esigncomply.com/llms.txt Scope 1. Server: create the session with the secret key from ESIGNCOMPLY_API_KEY. Send only the client token and the document version IDs to the browser. 2. Browser: attach @esigncomply/browser to the existing signup form's checkbox and button. Call complete() from the user's real click. 3. Server: confirm the record with the secret key before granting access. 4. Run npx esigncomply check --url http://localhost:3000/signup and fix every finding marked "block". Stop and ask me when - ESIGNCOMPLY_API_KEY is missing from your environment. Do not ask for the key in chat. - The docs do not cover a step. Never invent API methods, packages or legal wording. - A step conflicts with existing code. In the pull request, list the files you changed, the conformance summary, and anything you did not implement and why.
How to run it in Devin
Devin is an AI coding agent you hand tasks to. This is the whole run, from a new Esign Comply account to your first test record.
- 01Create 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. You create the account and accept the terms once. No card. After that Devin can do the rest: create keys, register documents, build the flow, verify the domain, go live. - 02Add the key to the environment Devin works inStore the test key as
ESIGNCOMPLY_API_KEYin the secrets or environment settings of that workspace. Keep it out of the task text: the prompt tells Devin to stop and tell you when the variable is missing. - 03Give Devin the prompt as a taskIt tells Devin to read the three docs pages, build the three parts, run the conformance check and open one pull request that lists the files, the conformance summary and anything left out.
- 04Review the pull requestThree things to look for: the secret key is read only in server code, the checkbox starts unchecked, and the account is created only after the server has confirmed the record.
- 05Run it and tick the boxCheck out the branch, start the app, open
/signup, tick the checkbox and click Create account. Your first test record is in the dashboard a moment later.
What you have 60 seconds after Devin finishes
Check out the branch and sign up once. This is the pull request you review, and the record your first test signup produces.
- 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.
- 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.
- 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, }); }
// app/signup/signup-form.tsx import { EsignComply } from "@esigncomply/browser"; // After /api/ceremony returns clientToken and documents: const ceremony = await EsignComply.attach({ clientToken }); await ceremony.presentDocument({ versionId: documents[0].version_id, mode: "hyperlink", link: document.querySelector("#tos-link"), }); await ceremony.presentDocument({ versionId: documents[1].version_id, mode: "hyperlink", link: document.querySelector("#privacy-link"), }); await ceremony.observeAssent({ region: document.querySelector("#assent"), // notice, links, box, button checkbox: document.querySelector("#agree"), // yours, unchecked submit: document.querySelector("#create-account"), // your button }); // Called from the real submit handler, after the user ticked the box. async function finishSignup() { const result = await ceremony.complete(); // result: { recordId, receipt, verifyUrl, status } await fetch("/api/signup/confirm", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ recordId: result.recordId }), }); }
// app/api/signup/confirm/route.ts import { esc } from "@/lib/esigncomply"; export async function POST(request: Request) { const { recordId } = await request.json(); const expected = await loadCeremonyState(request); // server-owned state const { data: record, error } = await esc.records.get(recordId); if (error) return Response.json({ confirmed: false }, { status: 409 }); const versions = record.documents.map((d) => d.version_id).sort(); const confirmed = ["recorded", "timestamped", "anchored"].includes(record.status) && record.livemode === (process.env.VERCEL_ENV === "production") && record.signer.external_id === expected.signerId && versions.join() === [...expected.versionIds].sort().join(); if (!confirmed) return Response.json({ confirmed: false }, { status: 409 }); // Only now create the account. return Response.json({ confirmed: true }); }
The example is a Next.js repository. In another stack, Devin writes the same three parts under that stack's file names.
One sealed test record, kept by Esign Comply
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 Devin gets right with the rules, and wrong without them
An agent working alone fills every gap in a task with a guess. The prompt closes the gaps that matter on a signing screen and tells Devin to stop and ask about the rest.
Affirmative assent control
The checkbox ships already ticked, or a handler ticks it for the user to save a click.
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.
Notice text names every document
One generic line, "By signing up, you agree to our terms", with no document titles and no links.
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.
Notice names the action control
"By continuing" or "by clicking below", next to a button that says something else.
The notice names the button by its exact label: "By checking the box and clicking Create account, you agree to the Terms of Service." The check flags vague phrases.
Notice and control in the same viewport
The agreement line sits in the footer or under a long form, below the fold on a phone.
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.
Single primary action control
Email signup and two social sign-in buttons in one form, all styled as the main action under one notice.
One primary button inside the assent container. Social sign-in gets its own container, its own notice and its own session.
Document links resolve to the registered version
A link to /terms that serves whatever is in the repo today, or the legal text pasted into a component.
Every link serves the registered version by its ID, and the record pins that version by SHA-256 hash. Document text is never copied into your code.
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 Devin
The signup clickwrap is a small first task. The larger ones follow the same split: Devin builds the screens, Esign Comply keeps the record.
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 DocuSignStack 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 guidesUse 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 casesThe exact rules for your regions
Pick your use case, regions, signer types and stack. You get one prompt to paste into Devin, with your own document and profile IDs and the rule packs you selected.
Generate a promptQuestions about Devin and e-signatures
Can Devin build an e-signature flow on its own?
Yes, with the rules in the task. The prompt on this page tells Devin what to read, what to build, when to stop and ask, and what to report. The result is one pull request with a signup clickwrap in your own UI, and Esign Comply keeps the independent record of each acceptance.
How does Devin get the Esign Comply API key?
From its environment. Store a test key as ESIGNCOMPLY_API_KEY in the secrets or environment settings of the workspace Devin works in. The prompt tells Devin to stop and tell you when the variable is missing, and never to ask for the key in chat.
Read the quickstartCan Devin create the Esign Comply account for me?
The account is the one step that is yours. You create it and accept the terms once, with no card. After that Devin can do the rest: create keys, register documents, build the flow, verify the domain and go live. If Devin has no access to your DNS provider, it asks you to add one TXT record.
Create a free accountWhat should I check in Devin's pull request?
Three things. The secret key is read only in server code and appears in no client file. The checkbox starts unchecked and nothing clicks it for the user. The account is created only after the server has read the record with the secret key. The conformance summary in the pull request covers the rest.
Server confirmation guideIs there a generated prompt for Devin?
Yes. In the prompt generator, pick Other as your tool. The result is one Markdown prompt for any coding agent, with your own document and profile IDs and the rules for your regions, and it downloads as an AGENTS.md section.
See the prompt generatorAssign Devin the build. Leave the record to us.
Free plan: 10 live signatures a month and a full test mode. No card required.
Devin is a trademark of its owner. Esign Comply is not affiliated with it.