PHPackages                             laulamanapps/document-signer-docusign - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. laulamanapps/document-signer-docusign

ActiveLibrary[API Development](/categories/api)

laulamanapps/document-signer-docusign
=====================================

DocuSign eSignature implementation of the document signer contract.

00PHPCI passing

Since Jun 30Pushed todayCompare

[ Source](https://github.com/LauLamanApps/document-signer-docusign)[ Packagist](https://packagist.org/packages/laulamanapps/document-signer-docusign)[ RSS](/packages/laulamanapps-document-signer-docusign/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

DocuSign eSignature implementation of the document signer SDK
=============================================================

[](#docusign-esignature-implementation-of-the-document-signer-sdk)

DocuSign eSignature implementation of the [`SignatureProvider`](https://github.com/LauLamanApps/document-signer-sdk/blob/main/src/Provider/SignatureProvider.php) contract from [`laulamanapps/document-signer-sdk`](https://github.com/LauLamanApps/document-signer-sdk).

Uses the OAuth 2.0 JWT user-consent grant to authenticate — no per-call user interaction once the integration user has granted consent.

Install
-------

[](#install)

```
composer require laulamanapps/document-signer-docusign
```

Quick start
-----------

[](#quick-start)

```
use LauLamanApps\DocumentSigner\Sdk\Document\Document;
use LauLamanApps\DocumentSigner\Sdk\Envelope\Envelope;
use LauLamanApps\DocumentSigner\Sdk\Signer\Signer;
use LauLamanApps\DocumentSigner\DocuSign\DocuSignConfig;
use LauLamanApps\DocumentSigner\DocuSign\DocuSignProvider;

$provider = new DocuSignProvider(new DocuSignConfig(
    integrationKey: getenv('DOCUSIGN_INTEGRATION_KEY'),
    userId:         getenv('DOCUSIGN_USER_ID'),
    accountId:      getenv('DOCUSIGN_ACCOUNT_ID'),
    privateKey:     file_get_contents('/path/to/private.pem'),
    oauthBaseUrl:   'account-d.docusign.com',           // 'account.docusign.com' in prod
    apiBaseUrl:     'https://demo.docusign.net/restapi', // production URL from userinfo
));

$receipt = $provider->send(new Envelope(
    name:         'Statement of Work',
    documents:    [new Document(
        id:   'sow',
        name: 'SoW',
        html: '{[signature:customer:sig]} on {[date:customer:signdate]}',
    )],
    signers:      [new Signer(key: 'customer', name: 'Jane Doe', email: 'jane@example.com')],
    emailSubject: 'Please sign the SoW',
));

echo $receipt->provider;           // "docusign" (DocuSignProvider::NAME)
echo $receipt->providerEnvelopeId; // DocuSign envelopeId GUID
```

What it does
------------

[](#what-it-does)

For every document in the envelope, this package:

1. Parses `{[type:signer:name]}` placeholders out of the HTML.
2. Substitutes each one with a hidden anchor token (`**DS:type:signer:name**`).
3. Renders the HTML to PDF via the SDK's `PdfRenderer`.
4. Base64-encodes each PDF and POSTs the envelope to `POST /v2.1/accounts/{accountId}/envelopes` with one anchor tab per placeholder under the correct recipient.
5. Returns an `EnvelopeReceipt` containing the DocuSign envelopeId and a normalised `EnvelopeStatus`.

Access tokens are minted via JWT and cached in memory by `DocuSignJwtAuth`until 60s before expiry. Reuse one `DocuSignProvider` per process.

Field mapping
-------------

[](#field-mapping)

SDK `FieldType`DocuSign tab bucket`Signature``signHereTabs``Initials``initialHereTabs``Text``textTabs``Date``dateSignedTabs``Checkbox``checkboxTabs`One-time setup: user consent
----------------------------

[](#one-time-setup-user-consent)

The first time the integration key impersonates a user, the user must approve consent in a browser:

```
https://account-d.docusign.com/oauth/auth
    ?response_type=code
    &scope=signature%20impersonation
    &client_id=YOUR_INTEGRATION_KEY
    &redirect_uri=https://www.docusign.com

```

Use `account.docusign.com` in production. After consent, JWT exchange runs non-interactively from then on.

Requirements
------------

[](#requirements)

- PHP 8.5
- `laulamanapps/documentsigner-sdk`
- `firebase/php-jwt` (pulled automatically)
- A DocuSign developer/production account, integration key, RSA key pair, and the impersonated user's GUID
- Node.js + Puppeteer (for the default Browsershot renderer)

Documentation
-------------

[](#documentation)

The full provider guide — credentials, JWT setup, demo vs prod URLs, endpoint mapping, status mapping, sequential signing, token caching, troubleshooting — lives in the SDK's docs:

- [DocuSign provider guide](https://github.com/LauLamanApps/document-signer-sdk/blob/main/docs/providers/docusign.md)
- [Placeholder syntax](https://github.com/LauLamanApps/document-signer-sdk/blob/main/docs/placeholders.md)
- [PDF rendering](https://github.com/LauLamanApps/document-signer-sdk/blob/main/docs/pdf-rendering.md)
- [Architecture overview](https://github.com/LauLamanApps/document-signer-sdk/blob/main/docs/architecture.md)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/930ca3b1756d00a63c8ff3363e81f16f961cf3ef79ff0c9d362670c36d97e456?d=identicon)[LauLaman](/maintainers/LauLaman)

---

Top Contributors

[![LauLaman](https://avatars.githubusercontent.com/u/8283992?v=4)](https://github.com/LauLaman "LauLaman (2 commits)")

### Embed Badge

![Health badge](/badges/laulamanapps-document-signer-docusign/health.svg)

```
[![Health](https://phpackages.com/badges/laulamanapps-document-signer-docusign/health.svg)](https://phpackages.com/packages/laulamanapps-document-signer-docusign)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
