Penneo SDK for PHP

Installs: 29

Dependents: 0

Watchers: 5

Forks: 1

Open Issues: 3

Language: PHP

v1.2.1 2014-10-21 19:10 UTC


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 about how to become a customer.


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

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

The recommended way to install the Penneo SDK is through Composer.

# Install Composer
curl -sS | 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


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


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
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
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

  • Folders Folder objects are containers for case file objects.
  • Case files The case file object is a container used to bundle documents and signers. Every signing process starts with a case file.
  • Documents The document object represents (and contains) the actual PDF document.
  • Signature lines 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 A signer object represents the person that signs.
  • SigningRequests 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 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

  • Validations 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

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.

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

// Create a new signable document in this case file
$myDocument = new Document($myCaseFile);
$myDocument->setTitle('Demo document');

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

// Create a new signature line on the document
$mySignatureLine = new SignatureLine($myDocument);

// Link the signer to the signature line

// Update the signing request for the new signer
$mySigningRequest = $mySigner->getSigningRequest();

// "Package" the case file for "sending".

// And finally, print out the link leading to the signing portal.
// The signer uses this link to sign the document.
print('<a href="'.$mySigningRequest->getLink().'">Sign now</a>');

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.

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

// Output the validation link.
print('<a href="'.$myValidation->getLink().'">Validate now</a>');