SDKs
Official eContract client for Node.js (@econtract/sdk on npm) with typed contracts, signature placement, embedded signing and webhook verification. The Laravel package is on Packagist; other languages use the OpenAPI document.
Node.js: @econtract/sdk
Typed client for Node.js 18+, no dependencies, ESM and CommonJS. It sends contracts, places signature boxes, hands out signing links (including <iframe> links), downloads the signed PDF and verifies webhooks.
npm install @econtract/sdkimport { readFile } from 'node:fs/promises';
import { Econtract } from '@econtract/sdk';
const ec = new Econtract({ apiKey: process.env.ECONTRACT_API_KEY! }); // cl_test_… while you build
const contract = await ec.sendContract({
title: 'Employment contract',
externalRef: 'HR-2026-0042',
files: [{ filename: 'contract.pdf', content: await readFile('contract.pdf') }],
signers: [{ email: '[email protected]', name: 'An Nguyen', signatureAnchor: { text: 'EMPLOYEE' } }],
delivery: 'link',
});
const links = await ec.getSigningLinks(contract.id);- Every POST carries an
Idempotency-Keyand is retried on network errors,429and5xxwithout creating a second contract. See Idempotency. verifyWebhook(rawBody, signatureHeader, secret)checks the HMAC-SHA256 signature in constant time. See Webhooks.ec.request(method, path, { body })calls any endpoint of the API reference with the same authentication, retries and errors.- Errors throw
EcontractErrorwithstatus,codeandbody; see Errors.
Package page: npmjs.com/package/@econtract/sdk. The README on npm lists every method.
PHP: Laravel package
contractlayer/econtract-laravel for Laravel 11, 12 and 13 (PHP 8.2+): a SignatureProvider interface your code depends on, the eContract implementation, webhook signature verification, a queued job that downloads the signed PDF and a reconcile command.
composer require contractlayer/econtract-laravelSetup and an example controller are in the README: github.com/contractlayer/econtract-laravel (packagist.org/packages/contractlayer/econtract-laravel).
Other languages
There is no official client for other languages yet. Generate one from the OpenAPI document, or start from the runnable Node.js mini HR app and the cURL scripts in github.com/contractlayer/econtract-integration-demo.
Integrating eContract
Add e-signature to your own software (ERP, HR, case management) with drafts, internal approval, signature positions by anchor or coordinates, signing links you deliver yourself, external references and verified webhooks.
Webhooks
Get contract and signing events pushed to your server, verify them and handle retries