PHPackages                             la-souris/document-signer-validsign - 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. la-souris/document-signer-validsign

ActiveLibrary

la-souris/document-signer-validsign
===================================

ValidSign implementation of the document signer SDK.

v1.0.0(yesterday)04↑2900%2MITPHP ^8.3

Since Jul 22Compare

[ Source](https://github.com/la-souris/package-document-signer-validsign)[ Packagist](https://packagist.org/packages/la-souris/document-signer-validsign)[ RSS](/packages/la-souris-document-signer-validsign/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (2)

ValidSign implementation of the document signer SDK.
====================================================

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

[ValidSign](https://www.validsign.eu/) implementation of the [`SignatureProvider`](https://github.com/la-souris/package-document-signer-sdk/blob/main/src/Provider/SignatureProvider.php) contract from [`la-souris/document-signer-sdk`](https://github.com/la-souris/package-document-signer-sdk).

Install
-------

[](#install)

```
composer require la-souris/document-signer-validsign
```

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

[](#quick-start)

```
use LaSouris\DocumentSigner\Sdk\Document\Document;
use LaSouris\DocumentSigner\Sdk\Envelope\Envelope;
use LaSouris\DocumentSigner\Sdk\Signer\Signer;
use LaSouris\DocumentSigner\ValidSign\ValidSignConfig;
use LaSouris\DocumentSigner\ValidSign\ValidSignProvider;

$provider = new ValidSignProvider(new ValidSignConfig(
    apiKey:  getenv('VALIDSIGN_API_KEY'),
    baseUrl: 'https://my.validsign.nl/api',
));

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

echo $receipt->provider;           // "validsign" (ValidSignProvider::NAME)
echo $receipt->providerEnvelopeId; // ValidSign packageId
```

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 [ValidSign text-tag](https://validsign.zendesk.com/hc/nl/articles/360037747091-Text-tags-gebruiken-binnen-documenten)— e.g. `{{esl_sig:Signer1:Signature:size(200,50)}}`. The SDK translates the arbitrary signer key from the envelope (`counterparty`, `customer`, …) into ValidSign's positional `Signer1`, `Signer2`, … tokens.
3. Renders the HTML to PDF via the SDK's `PdfRenderer` (Browsershot by default).
4. POSTs the PDFs + a `package` JSON to `POST /packages` with `documents[].extract = true`. ValidSign discovers the text-tags in the PDF server-side and places the matching fields on the corresponding signer — no per-field configuration in the API payload.
5. Returns an `EnvelopeReceipt` containing the ValidSign package id and a normalised `EnvelopeStatus`.

Downloads
---------

[](#downloads)

`downloadSigned()`, `downloadSignedDocument()`, and `downloadAudit()` all write to a temp file and hand you an `\SplFileInfo` — check the extension:

```
$archive = $provider->downloadSigned($packageId);
// $archive->getExtension() === 'zip'
// A ZIP with one signed PDF per document in the package (endpoint: /packages/{id}/documents/zip)

$pdf = $provider->downloadSignedDocument($packageId, 'nda');
// $pdf->getExtension() === 'pdf'
// The signed PDF for a single document (endpoint: /packages/{id}/documents/{documentId})
// $documentId is the same id you set on Document::$id when calling send().

$audit = $provider->downloadAudit($packageId);
// $audit->getExtension() === 'pdf'
// The Evidence Summary Report (endpoint: /packages/{id}/evidence/summary)
```

Callers own the file lifecycle — copy or `@unlink()` when done.

Webhook events
--------------

[](#webhook-events)

`ValidSign\Webhook\EventType` is a string-backed enum covering every callback event ValidSign can emit — `PACKAGE_COMPLETE`, `PACKAGE_DECLINE`, `SIGNER_COMPLETE`, `KBA_FAILURE`, and so on. Values match ValidSign's vocabulary verbatim.

```
use LaSouris\DocumentSigner\ValidSign\Webhook\EventType;
use LaSouris\DocumentSigner\Laravel\Events\DocumentSignerWebhookReceived;

public function handle(DocumentSignerWebhookReceived $event): void
{
    if ($event->provider::NAME !== 'validsign') {
        return;
    }

    $type = EventType::tryFromPayload($event->payload);
    match ($type) {
        EventType::PackageComplete => $this->onCompleted($event->payload),
        EventType::PackageDecline  => $this->onDeclined($event->payload),
        EventType::KbaFailure      => $this->onKbaFailure($event->payload),
        EventType::Unknown         => Log::info('unknown ValidSign event', ['payload' => $event->payload]),
        default                    => null, // don't care about this event
    };
}
```

`tryFromPayload()` scans the payload for the first recognised event key (`name`, `event`, `type`, `eventName`, `eventType`) — ValidSign has been observed to key it under different names across tenants — and resolves anything it doesn't recognise to `EventType::Unknown` (it never returns `null`).

The enum implements the SDK's [`WebhookEvent`](https://github.com/la-souris/package-document-signer-sdk/blob/main/src/Webhook/WebhookEvent.php)interface, so listeners can also dispatch on the semantic category (`isCompleted()`, `isDeclined()`, `isFailure()`, `isProgress()`) without matching on individual cases — useful when the same handler needs to serve multiple providers.

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

[](#field-mapping)

Each SDK `FieldType` becomes a ValidSign text-tag with a default size. The optional `*` prefix marks a field as required — signatures and initials are implicitly required per ValidSign, so no prefix is applied for them.

SDK `FieldType`Emitted text-tag`Signature``{{esl_:SignerN:Signature:size(200,50)}}``Initials``{{esl_:SignerN:initials:size(100,30)}}``Text``{{*esl_:SignerN:TextField:size(200,20)}}``Date``{{esl_:SignerN:SigningDate:size(120,20)}}``Checkbox``{{*esl_:SignerN:Checkbox:size(20,20)}}``` is your placeholder's field name; `SignerN` is the signer's positional index in `Envelope::$signers` (1-based).

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

[](#requirements)

- PHP 8.3
- `la-souris/document-signer-sdk`
- A ValidSign tenant + API key
- Node.js + Puppeteer (for the default Browsershot renderer)

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

[](#documentation)

The full provider guide — credentials, endpoint mapping, status mapping, sequential signing, injecting a custom HTTP client, troubleshooting — lives in the SDK's docs:

- [ValidSign provider guide](https://github.com/la-souris/package-document-signer-sdk/blob/main/docs/providers/validsign.md)
- [Placeholder syntax](https://github.com/la-souris/package-document-signer-sdk/blob/main/docs/placeholders.md)
- [PDF rendering](https://github.com/la-souris/package-document-signer-sdk/blob/main/docs/pdf-rendering.md)
- [Architecture overview](https://github.com/la-souris/package-document-signer-sdk/blob/main/docs/architecture.md)

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance100

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/la-souris-document-signer-validsign/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.7k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k46](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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