PHPackages                             pierrebelin/universign - 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. pierrebelin/universign

ActiveLibrary

pierrebelin/universign
======================

PHP library for universign

1.2.0(5y ago)18412[1 PRs](https://github.com/pierrebelin/universign/pulls)MITPHPCI passing

Since Jul 24Pushed 1mo agoCompare

[ Source](https://github.com/pierrebelin/universign)[ Packagist](https://packagist.org/packages/pierrebelin/universign)[ Docs](https://github.com/pierrebelin/universign)[ RSS](/packages/pierrebelin-universign/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (1)Versions (8)Used By (0)

Universign PHP Library
======================

[](#universign-php-library)

[![Build Status](https://camo.githubusercontent.com/5a35ce3a4c467bcc026ce6efe02748b603de6518078be9f06faaef84222ddf11/68747470733a2f2f7472617669732d63692e6f72672f70696572726562656c696e2f756e697665727369676e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/pierrebelin/universign)[![Latest Stable Version](https://camo.githubusercontent.com/fcbc2d584dd8d8e4780fda91f99f35322e49cb1ad60b01b56817e618181e12a7/68747470733a2f2f706f7365722e707567782e6f72672f70696572726562656c696e2f756e697665727369676e2f76)](//packagist.org/packages/pierrebelin/universign)[![Latest Unstable Version](https://camo.githubusercontent.com/94e524b44b1e4ce9ff7e3bb46ce09e02e836811d4ef4beeb6991fb8c6867ce20/68747470733a2f2f706f7365722e707567782e6f72672f70696572726562656c696e2f756e697665727369676e2f762f756e737461626c65)](//packagist.org/packages/pierrebelin/universign)[![License](https://camo.githubusercontent.com/31521fb0a7e6f53571f759400ed6bb4439ef545143bbbccfbde403c06a6eb64c/68747470733a2f2f706f7365722e707567782e6f72672f70696572726562656c696e2f756e697665727369676e2f6c6963656e7365)](//packagist.org/packages/pierrebelin/universign)[![Dependents](https://camo.githubusercontent.com/d7313896029885dcea1aecb68677f22d9633698b0987c43fbccd2d4bddfe7cf7/68747470733a2f2f706f7365722e707567782e6f72672f70696572726562656c696e2f756e697665727369676e2f646570656e64656e7473)](//packagist.org/packages/pierrebelin/universign)

This library is unofficial, not developed by Universign. It only contains usual functions used for Universign : send documents for signature, download it.

If you need help to implements this service on your website, feel free to contact me at :

This library is highly inspired by this one which is no longer maintain :

How to use
----------

[](#how-to-use)

You can copy-paste the following code and it will automatically connect you to your universign account.

### Fill constants

[](#fill-constants)

```
$ACCOUNT_USER_MAIL = 'contact@pierrebelin.fr';
$ACCOUNT_USER_PASSWORD = 'xxxxxxxxx';
$UNIVERSIGN_PROFILE = 'default'; // you don't have to change this one, if you want to, read the manual
```

### Create signature fields

[](#create-signature-fields)

```
$signatureField1 = new DocSignatureField();
$signatureField1->setPage(1)
                ->setX(10)
                ->setY(230)
                ->setSignerIndex(0);
```

### Get your document

[](#get-your-document)

```
$document = new TransactionDocument();
$document
    ->setContent(file_get_contents('path/to/file/file.pdf'))
    ->addSignatureField($signatureField1) // you can add multiples times ->addSignatureField($signatureField2) etc...
    ->setName('Document name');
```

### Create signers

[](#create-signers)

```
$signer = new TransactionSigner();
$signer
    ->setFirstname('Pierre')
    ->setLastname('Belin')
    ->setEmailAddress('contact@pierrebelin.fr')
    ->setPhoneNum('0606060606')
    ->setBirthDate('19900131T00:00:00') // This format is needed yyyymmddT00:00:00 as string for 31/01/1990
    ->setSuccessURL('https://www.universign.eu/fr/sign/success/')
    ->setCancelURL('https://www.universign.eu/fr/sign/cancel/')
    ->setFailURL('https://www.universign.eu/fr/sign/failed/');

```

### Create transaction

[](#create-transaction)

```
$request = new TransactionRequest();
$request
    ->addSigner($signer) // you can add multiples times ->addSignatureField($signer2) etc...
    ->addDocument($document) // you can add multiples times ->addDocument($document2) etc...
    ->setProfile($UNIVERSIGN_PROFILE)
    ->setCustomId(uniqid()) // create your own ID to make easier to get later
    ->setMustContactFirstSigner(false)
    ->setFinalDocSent(true)
    ->setDescription("This is my description")
    ->setCertificateType(TransactionRequestCertificate::CERTIFICATE_CERTIFIED)
    ->setLanguage(TransactionRequestLanguage::FRENCH)
    ->setHandwrittenSignature(true)
    ->setChainingMode(TransactionRequestChainingMode::CHAINING_MODE_EMAIL);
```

### Transaction request

[](#transaction-request)

```
$requester = new Requester($ACCOUNT_USER_MAIL, $ACCOUNT_USER_PASSWORD, false);
$requester->requestTransaction($request);
```

### Transaction response

[](#transaction-response)

```
$transactionId = $response->getId();
$transactionUrl = $response->getUrl();
```

### Get documents

[](#get-documents)

```
$response = $requester->getDocuments('TRANSACTIONID');
$response = $requester->getDocumentsByCustomId('CUSTOMID');
```

### Get Transaction info

[](#get-transaction-info)

```
$response = $requester->getTransactionInfo('TRANSACTIONID');
```

### Send SEPA

[](#send-sepa)

Replace your document by :

```
$sepaFrom = new SEPAThirdParty();
$sepaFrom
    ->setName('from')
    ->setAddress('this address')
    ->setPostalCode('69001')
    ->setCity('Lyon')
    ->setCountry('France');

$sepaTo = new SEPAThirdParty();
$sepaTo
    ->setName('to')
    ->setAddress('to address')
    ->setPostalCode('69002')
    ->setCity('Lyon')
    ->setCountry('France');

$sepa = new SEPAData();
$sepa
    ->setIcs('XXXXXXXXXXXXX')
    ->setIban('FR7616798000010000191892XXXX')
    ->setBic('TRZOFR21XXX')
    ->setDebtor($sepaFrom)
    ->setCreditor($sepaTo);

$document = new TransactionDocument();
$document
    ->setDocumentType(TransactionDocumentType::SEPA)
    ->setName('SEPA')
    ->setSEPAData($sepa);
```

Issues
------

[](#issues)

### Classes not found

[](#classes-not-found)

Do not forget to include your autoload and all classes

```
require __DIR__ . '/vendor/autoload.php';

use PierreBelin\Universign\{
    Request\TransactionDocument,
    Request\TransactionSigner,
    ...
};
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance59

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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.

###  Release Activity

Cadence

Every ~2 days

Total

5

Last Release

2056d ago

Major Versions

0.1 → 1.02020-07-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/f50dd3052c973a1e9ea4a0578702e42d9eceda6a4c14a7bee71677ed68e5e914?d=identicon)[pierrebelin](/maintainers/pierrebelin)

---

Top Contributors

[![pierrebelin](https://avatars.githubusercontent.com/u/25244392?v=4)](https://github.com/pierrebelin "pierrebelin (24 commits)")[![YohannHTC](https://avatars.githubusercontent.com/u/3177431?v=4)](https://github.com/YohannHTC "YohannHTC (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pierrebelin-universign/health.svg)

```
[![Health](https://phpackages.com/badges/pierrebelin-universign/health.svg)](https://phpackages.com/packages/pierrebelin-universign)
```

PHPackages © 2026

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