Skip to content
Platform · Render

Add e-signatures and clickwrap to a Render app

To add e-signatures and clickwrap to a Render app, run the esigncomply package in a Node.js web service and declare the secret key in render.yaml with sync: false, so the file never holds it. The service creates the session and confirms the record, and Render Postgres keeps the receipt. Esign Comply seals each acceptance as an independent record.

Follow the quickstart and each signature is a valid electronic signature under the U.S. ESIGN Act, state UETA laws and New York's ESRA, and each clickwrap is built the way courts require: clear notice of the terms, an unmistakable act of assent, and a sealed record of both.

$npm install esigncomply pg
Render quickstart

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

Last updated

Run locally for Render before publishing
server.js (excerpt)
// Step 4: create the session with the secret key. The browser gets the client token only.
if (req.method === "POST" && url.pathname === "/api/ceremony") {
  const { data: session, error } = await esc.sessions.create(
    {
      profile: process.env.ESIGNCOMPLY_PROFILE_ID,
      signer,
      documents: [
        { document: DOCUMENTS.terms, version: "current" },
        { document: DOCUMENTS.privacy, version: "current" },
      ],
      // The page that runs the ceremony: the origin the browser reports, plus its path.
      context: { url: `${req.headers.origin ?? url.origin}/signup`, locale: "en-US", purpose: "account_signup" },
    },
    { idempotencyKey: `signup-${signer.external_id}-${randomUUID()}` },
  );
  if (error) return json(res, 502, { error: error.code });
  // In Postgres, not in memory: the confirmation can reach another instance.
  await savePinned(signer.external_id, session.documents.map((d) => d.version_id).sort());
  return json(res, 200, { clientToken: session.client_token, apiUrl: session.api_url, documents: session.documents });
Integrate with Render

How do you integrate Esign Comply with Render?

On Render the server half is one Node.js web service, declared in a render.yaml Blueprint with its database. It listens on 0.0.0.0 on the port in PORT, and Render sends health checks to /health on each instance. Render load-balances a scaled service across its instances, so the pinned versions go to Render Postgres.

Render is a cloud application platform for deploying, securing, and scaling applications, from hundred-line prototypes to complex multi-service architectures.

Source: Render documentation, llms.txt, read on .
Where each part lives on Render
  • Web serviceserver.js
  • render.yamlrender.yaml
  • Confirmserver.js
  • Live flagserver.js

Run on 2026-11-26 with Node.js 24.22.1, the default version of Render's Node.js runtime on that date, started the way the Blueprint says (npm ci, then node server.js) with the variables Render sets (PORT, NODE_ENV, RENDER, IS_PULL_REQUEST), as two instances on one PostgreSQL 17 database, with esigncomply 1.0.4, pg 8.23.1, the browser SDK script build and the conformance check from esigncomply 1.0.4, against the API in test mode. render.yaml was checked against the JSON Schema Render publishes for Blueprints. The Render settings are from Render's documentation as of 2026-11-25. Nothing has been deployed to Render yet.

Three steps

How does Esign Comply fit with Render?

Each step uses a feature Render already has. The secret key stays on the server side of Render in all three.

  1. 01
    An environment variable of the service holds the keyThe Blueprint declares ESIGNCOMPLY_API_KEY with sync: false. Render asks for the value in the Dashboard when the Blueprint is first created, and the file never contains it. The SDK reads the key from process.env. Source: Render documentation, Blueprint YAML Reference, read on .
  2. 02
    The web service creates the sessionPOST /api/ceremony runs in your Node.js web service. It calls esc.sessions.create and returns the client token. The same service serves the signup page, and the browser SDK records the ceremony from the signer's device. Source: Render documentation, Web Services, read on .
  3. 03
    Render Postgres keeps the receiptThe session route stores the pinned versions in a table in Render Postgres. The Blueprint sets DATABASE_URL from the database's connectionString. The confirm route reads the record with the secret key, compares it with the row, and writes the record ID and the receipt into it. Source: Render documentation, Create and Connect to Render Postgres, read on .
Render setup

Where do the key, the preview hosts and the webhook go on Render?

Four settings carry an Esign Comply integration on Render. What is said here about Render was read from its own documentation, and the quickstart has each command.

Environment variables

Render asks for a sync: false value only when the Blueprint is first created. To change the key later, or to add it to a service that already exists, set it on the service's Environment page. Variable values are always strings, so the server compares ESIGNCOMPLY_LIVE and IS_PULL_REQUEST with "true".

Source: Render documentation, Blueprint YAML Reference, read on .

Instances, the health check and the port

A web service has to listen on 0.0.0.0, on the port in PORT, which is 10000 unless you change it. Render sends health checks to each running instance every few seconds. The quickstart's /health answers 503 when the database does not.

Source: Render documentation, Health Checks, read on .

Previews and test mode

Each preview has an onrender.com host of its own. A test key refuses a host it does not know: list the exact host under Domains in the Esign Comply dashboard as a test origin, and give the preview the test key and the test IDs. Never list the shared suffix onrender.com.

Source: Render documentation, Service Previews, read on .

The registered domain and the webhook

Register your custom domain and verify it with one DNS record. A production service on its onrender.com host verifies with a file at /.well-known/esigncomply.txt. For the record.completed webhook, add a route to the service and register its production URL under Webhooks in the Esign Comply dashboard.

Read on : Render documentation, Web Services, Render documentation, Blueprint YAML Reference, Render documentation, Default Environment Variables, Render documentation, Service Previews, Render documentation, Preview Environments, Render documentation, Health Checks, Render documentation, Scaling Render Services, Render documentation, Create and Connect to Render Postgres.

Copy-paste prompt

What prompt adds Esign Comply clickwrap to a Render app?

Paste this into Cursor, Claude Code or the AI coding tool that is open on your project. It names the packages that exist, where the secret key goes on Render, what to build and what never to do, and it ends with the rules block for your project.

The rules block lives at /rules.md. Added to your project's instruction file, it makes every later session build signing and acceptance flows the same way. The prompt generator writes the long version, with your own document and profile IDs.

Pages for each AI tool
Prompt: Esign Comply clickwrap on Render
Add Esign Comply clickwrap to my app on Render: a signup form where the user accepts the Terms of Service and the Privacy Notice with a checkbox and a button.

Read these first and follow them exactly. If something conflicts with existing code, or you are unsure how to implement a step, stop and ask. Do not invent API methods, packages or legal wording.
- https://esigncomply.com/docs/quickstart/render.md (the steps and the tested code for Render)
- https://esigncomply.com/setup.md (the order of API calls)
- https://esigncomply.com/auth.md (how to handle the keys)

Render facts
- Packages (the only ones that exist): esigncomply (server, Node.js 20.19 or later, an ES module) and @esigncomply/browser. Without a bundler, load the browser SDK from https://esigncomply.com/sdk/v1/esigncomply.js.
- The secret key is the environment variable ESIGNCOMPLY_API_KEY of the web service, declared in render.yaml with sync: false and typed into the Render Dashboard. Never write its value in render.yaml. Never print it.
- A web service listens on 0.0.0.0 on the port in PORT, 10000 by default.
- A service can run several instances. Keep the pinned version IDs in Render Postgres (DATABASE_URL, from the database's connectionString), never in a variable of the process. Give the pg pool an error listener.
- A pull request preview copies the variables of the base service and has IS_PULL_REQUEST set to "true". Never expect live records there.
- The page is on screen before the script has a session: render the checkbox disabled and enable it when observeAssent has resolved.

Build
1. Verify the key: GET /v1/usage with ESIGNCOMPLY_API_KEY. Stop if it fails.
2. Register the Terms of Service and the Privacy Notice as documents and publish one version of each from the documents in this project. If the project has none, register short sample documents and say so in your report. Never write or change the wording of the real documents. Create a profile: jurisdictions ["US-FED"], method "checkbox", assurance_level "L1".
3. Server: POST /api/ceremony creates the session with esc.sessions.create and an Idempotency-Key, saves the signer ID and the pinned version IDs in Postgres, and returns only clientToken, apiUrl and documents.
4. Server: GET /legal/terms and /legal/privacy render the registered version from esc.documents.versions.getContent inside <article data-esc-document>, unmodified.
5. Browser: EsignComply.attach({ clientToken, apiUrl }), presentDocument for each link, observeAssent({ region, checkbox, submit }), then complete() from the user's real click.
6. Server: POST /api/signup/confirm reads the record with esc.records.get and requires: status is "recorded", "timestamped" or "anchored"; livemode is as expected; the signer ID and version IDs equal the row in Postgres. Only then create the account, and store the record ID and the receipt in the same row.

Never
- Never pre-check the box, auto-submit, or call .click() on the user's behalf.
- Never use "By continuing" or "By clicking below" wording. The notice names the button by its label and each document by its registered name.
- Never put the secret key, or any call that uses it, in code that reaches the browser.
- Never show "signed" or "accepted" before the server has confirmed the record.
- Never fall back to an acceptance with no record when a session is refused.

Check before you report success
- Run: npx esigncomply check --url http://localhost:10000/signup --callback http://localhost:10000/api/signup/confirm
  Fix every finding marked "block". List every finding marked "warn".
- Report the files you created or changed, anything you did not implement and why, and the conformance summary.

Then add the rules block to this project's instruction file: https://esigncomply.com/rules.md
3 things to watch

What goes wrong when you add e-signatures on Render?

These are specific to Render. Each one was seen while the quickstart's code was run, or is in Render's own documentation.

  • 01

    A pull request preview copies the live key

    Render's documentation says a preview instance copies all settings of its base service, environment variables included. A live key works only on your registered domain, so a session on the preview's onrender.com host is refused with domain_mismatch. Replace the key and the IDs on the preview instance with the test ones.

    Source: Render documentation, Service Previews, read on .
  • 02

    A preview environment starts without the key

    Render does not copy sync: false variables into a preview environment built from the Blueprint, so the session route answers missing_api_key there. Put the test key in an environment group you create in the Dashboard and reference it with fromGroup. A value set on the service itself takes precedence over a group.

    Source: Render documentation, Preview Environments, read on .
  • 03

    Without a listener on the pool, a closed connection stops the instance

    In the test, the database closed an idle connection and the Node.js process exited with terminating connection due to administrator command: pg 8.23.1 raised the error on the pool and nothing listened for it. With the one-line listener in store.js, the instance logged the message and answered the next request.

Verifiable

What does Esign Comply record for a signature on Render?

The same record on every stack and platform. Your Render code creates the session and confirms the record, and the browser SDK reports what happened on the page. Esign Comply seals the result where your code cannot change it. The record itself is described on Evidence and verification.

  • Observed and asserted fields

    Every field is tagged. Observed is what the browser SDK and the API saw: the box unchecked at load, the tick from a trusted user event, the notice text, the terms version by hash, the server time. Asserted is what your app said, such as the user's email.

  • A signed receipt

    complete() returns a receipt signed with ES256, using keys you do not hold. Your server stores it next to the user, and GET /v1/records/{id}/receipt returns it again.

  • An external timestamp

    An outside authority timestamps the hash of every live record (RFC 3161), so the time on the record does not rest on your clock or on ours.

  • An offline verifier

    Each record has an evidence report (PDF) and an evidence package (ZIP). Anyone you send the package to checks the acceptance with the open-source esigncomply-verify, without an account.

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

Questions about e-signatures on Render

How does test mode work on Render preview URLs?

Each preview answers on an onrender.com host of its own, which a test key refuses until you list that exact host under Domains as a test origin. A pull request preview copies the variables of its base service, so replace the live key with the test key there. On localhost a test key works with no setup.

Where should the receipt be stored on Render?

In Render Postgres, beside the signer ID and the record ID. The confirm route writes both once the record is confirmed. The quickstart's Blueprint declares the database and uses one row for the pinned versions and the receipt.

Why does the server check IS_PULL_REQUEST?

Because a pull request preview copies the variables of its base service, ESIGNCOMPLY_LIVE included, and Render sets IS_PULL_REQUEST to the string true in a preview. In the test, an instance with both set accepted a test record, and one with ESIGNCOMPLY_LIVE alone refused it with 409.

Does render.yaml ever contain the secret key?

No. The Blueprint declares ESIGNCOMPLY_API_KEY with sync: false, and Render asks for the value in the Dashboard when the Blueprint is first created. The file in the quickstart was checked against the JSON Schema that Render publishes for Blueprints.

Was this code run on Render's own runtime?

Not yet. Render's Node.js runtime runs on Render, so the code ran locally on Node.js 24.22.1, that runtime's default version on November 25, 2026, started the way the Blueprint says, as two instances on one database. The Blueprint, previews and the onrender.com host are proven only by a deployment.

Run the signing flow in your Render web service. Leave the record to us.

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

Render is a trademark of its owner. Esign Comply is not affiliated with it. What this page says about Render is from Render's documentation or from a test run, as marked, on . /render.md is this page as Markdown.

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