PHPackages                             morningtrain/penneo-api - 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. morningtrain/penneo-api

ActiveLibrary[API Development](/categories/api)

morningtrain/penneo-api
=======================

Penneo SDK for PHP

1.5.1(9y ago)024PHPPHP &gt;=5.3.0

Since Feb 12Pushed 9y ago3 watchersCompare

[ Source](https://github.com/Morning-Train/penneo-api)[ Packagist](https://packagist.org/packages/morningtrain/penneo-api)[ Docs](https://penneo.com)[ RSS](/packages/morningtrain-penneo-api/feed)WikiDiscussions master Synced 2mo ago

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

Penneo SDK for PHP
==================

[](#penneo-sdk-for-php)

Penneo is all about digitizing the process of signing documents and contacts. The Penneo SDK for PHP enables PHP developers to use digital signing of documents in their PHP code. Get more info at [penneo.com](https://penneo.com/) about how to become a customer.

Prerequisites
-------------

[](#prerequisites)

The Penneo SDK for PHP requires that you are using PHP 5.3 or newer. Also you must have a recent version of cURL &gt;= 7.16.2 compiled with OpenSSL and zlib.

Getting Started
---------------

[](#getting-started)

You can install the SDK by simply cloning or downloading the source, or you can use Composer. We recommend that you use Composer:

### Installing via Composer

[](#installing-via-composer)

The recommended way to install the Penneo SDK is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, update your project's composer.json file to include the SDK:

```
{
    "require": {
        "penneo/penneo-sdk-php": "1.*"
    }
}
```

After installing, you need to require Composer's autoloader:

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

You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at [getcomposer.org](http://getcomposer.org).

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

[](#documentation)

This section documents the different objects available through the SDK and how to use them.

### Authentication

[](#authentication)

In order to use the SDK, you will have to authenticate against the Penneo API. Authentication is done in a single line of code, using your Penneo API credentials:

```
// Initialize the connection to the API
Penneo\SDK\ApiConnector::initialize('apiKeyHere', 'apiSecretHere', $endpoint);
```

If you have a reseller account, you can carry out operations on behalf of one of your customers, by specifying the customer id as well:

```
// Initialize the connection to the API as customer
Penneo\SDK\ApiConnector::initialize('apiKeyHere','apiSecretHere', $endpoint, $customerId);
```

The endpoint url can point to either the sandbox (for testing) or the live system. Both endpoint urls are available on request.

### Document signing

[](#document-signing)

- [Folders](docs/folder.md)Folder objects are containers for case file objects.
- [Case files](docs/casefile.md)The case file object is a container used to bundle documents and signers. Every signing process starts with a case file.
- [Documents](docs/document.md)The document object represents (and contains) the actual PDF document.
- [Signature lines](docs/signature-line.md)Every signable document must have at least one signature line. Think of it as the dashed line that people used to sign using a pen...
- [Signers](docs/signer.md)A signer object represents the person that signs.
- [SigningRequests](docs/signing-request.md)Think of the signing request as being the instructions for the signer on what to sign. It can either be the formal letter accompanying the document, the yellow post-its showing where to sign, or both.
- [Case file templates](docs/templates.md)Instead of specifying the mapping between documents and signers explicitly, it is possible to use one of the many pre-defined case file templates provided by Penneo.

### Identity validation

[](#identity-validation)

- [Validations](docs/validation.md)Money laundering regulations require companies to validate the identity of their clients. The validation object can accomplish this, using only a social security number and an electronic ID.

Quick Examples
--------------

[](#quick-examples)

### Signing a document (simple)

[](#signing-a-document-simple)

In this example, we show how to create a document with a single signer. The link to the Penneo signing portal, where the actual signing takes place, is printed as a result.

```
namespace Penneo\SDK;

// Create a new case file
$myCaseFile = new CaseFile();
$myCaseFile->setTitle('Demo case file');
CaseFile::persist($myCaseFile);

// Create a new signable document in this case file
$myDocument = new Document($myCaseFile);
$myDocument->setTitle('Demo document');
$myDocument->setPdfFile('/path/to/pdfFile');
$myDocument->makeSignable();
Document::persist($myDocument);

// Create a new signer that can sign documents in the case file
$mySigner = new Signer($myCaseFile);
$mySigner->setName('John Doe');
Signer::persist($mySigner);

// Create a new signature line on the document
$mySignatureLine = new SignatureLine($myDocument);
$mySignatureLine->setRole('MySignerRole');
SignatureLine::persist($mySignatureLine);

// Link the signer to the signature line
$mySignatureLine->setSigner($mySigner);

// Update the signing request for the new signer
$mySigningRequest = $mySigner->getSigningRequest();
$mySigningRequest->setSuccessUrl('http://go/here/on/success');
$mySigningRequest->setFailUrl('http://go/here/on/failure');
SigningRequest::persist($mySigningRequest);

// "Package" the case file for "sending".
$myCaseFile->send();

// And finally, print out the link leading to the signing portal.
// The signer uses this link to sign the document.
print('Sign now');
```

### Validating a person (money laundering regulations)

[](#validating-a-person-money-laundering-regulations)

In this example we demontrate, how to validate a person from his/her electronic ID and social security number. The result is a link to the Penneo validation page. The person in question must follow the link and complete some actions in order to be validated.

```
namespace Penneo\SDK;

// Create a new validation
$myValidation = new Validation();
$myValidation->setTitle('My new validation');
$myValidation->setName('John Doe');
Validation::persist($myValidation);

// Output the validation link.
print('Validate now');
```

Resources
---------

[](#resources)

- [API documentation](https://app.penneo.com/api/docs) - Information about the Penneo API, methods and responses

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 92.5% 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 ~78 days

Total

14

Last Release

3454d ago

Major Versions

v0.1 → v1.0.02014-03-21

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/278725?v=4)[morningtrain](/maintainers/morningtrain)[@morningtrain](https://github.com/morningtrain)

---

Top Contributors

[![janflora](https://avatars.githubusercontent.com/u/2083844?v=4)](https://github.com/janflora "janflora (49 commits)")[![ahmadnazir](https://avatars.githubusercontent.com/u/527355?v=4)](https://github.com/ahmadnazir "ahmadnazir (4 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/morningtrain-penneo-api/health.svg)

```
[![Health](https://phpackages.com/badges/morningtrain-penneo-api/health.svg)](https://phpackages.com/packages/morningtrain-penneo-api)
```

###  Alternatives

[rackspace/php-opencloud

PHP SDK for Rackspace/OpenStack APIs

4495.9M38](/packages/rackspace-php-opencloud)[cdaguerre/php-trello-api

Trello API v2 client

255666.7k3](/packages/cdaguerre-php-trello-api)[dchesterton/marketo-rest-api

A PHP client for the Marketo.com REST API

41844.1k1](/packages/dchesterton-marketo-rest-api)[carlosio/geckoboard

A PHP library for dealing with Geckoboard API (http://www.geckoboard.com)

40172.2k](/packages/carlosio-geckoboard)[teepluss/api

Laravel 4 Internal Request (HMVC)

7034.0k](/packages/teepluss-api)[jlinn/mandrill-api-php

A PHP client library for Mandrill's REST API

24117.4k](/packages/jlinn-mandrill-api-php)

PHPackages © 2026

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