pingencom/pingen2-sdk-php
Larablocks Analysis
pingencom/pingen2-sdk-php works with Laravel 10 to 13 (latest release 2.24.0, Nov 23, 2026).
Laravel 8 and 9 in earlier releases.
Recommendation checks
Solid choiceSolid choice: maintained and up to date, meets 3 of 4 checks; below the bar for Recommended on use.
- Works with Laravel 13, the current version
- Released in the last 12 months (Nov 23, 2026)
- 30,826 downloads a month (at least 10,000)
- 3 GitHub stars (needs 100)
State
Actively maintained- Last stable release: Nov 23, 2026.
- 9 releases in the last 12 months.
- First released: Mar 15, 2021.
- Monthly downloads: 30,826.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 29, 2026.
| Install | |
|---|---|
composer require pingencom/pingen2-sdk-php |
|
| Latest Version: | 2.24.0 |
| PHP: | ^8.2|^8.3|^8.4|^8.5|^8.6 |
| Laravel: | 10 – 13 |
| Older releases: | 8 · 9 |
| License: | BSD-3-Clause |
| Last Updated: | Nov 23, 2026 |
| Links: | GitHub · Packagist |
Requirements
You need to have an account in Pingen and obtain OAuth credentials for your desired grant type (usually client_credentials).
How to obtain these, are described here: https://api.pingen.com/documentation#section/Authentication/How-to-obtain-a-Client-ID
Installation
Require the package via composer (Get composer here: https://getcomposer.org/download/)
composer require pingencom/pingen2-sdk-php
Environments
We have two Environments available: Production and Staging (see https://api.pingen.com/documentation#section/Basics/Environments)
This SDK supports staging as well. When initiating the provider (see Usage), the optional 'staging' attribute should be set, as well as when creating an endpoint object.
Usage
The simplest way to integrate is using the client credentials grant (see https://api.pingen.com/documentation#section/Authentication/Which-grant-type-should-i-use)
require __DIR__ . '/vendor/autoload.php';
$provider = new \Pingen\Provider\Pingen(
array(
'clientId' => 'YOUR_OAUTH2_CLIENT_ID',
'clientSecret' => 'YOUR_OAUTH2_CLIENT_SECRET',
'staging' => true,
)
);
$access_token = $provider->getAccessToken('client_credentials');
$lettersEndpoint = (new \Pingen\Endpoints\LettersEndpoint($access_token))
->setOrganisationId('INSERT_YOUR_ORGANISATION_UUID_HERE')
->useStaging();
$lettersEndpoint->uploadAndCreate(
(new \Pingen\Endpoints\DataTransferObjects\Letter\LetterCreateAttributes())
->setFileOriginalName('your_original_pdf_name.pdf')
->setAddressPosition('left')
->setAutoSend(false),
fopen('path_to_your_original_pdf_name.pdf', 'r')
);
Examples & Docs
The integration tests, available in this repository, give you many examples and flows, which can provide a solid starting ground to use the SDK.
For detailed research, documentation and examples, our API Docs are here: https://api.pingen.com/documentation
On the right-hand side of every endpoint you can see request samples for all languages and SDKs, which you can copy and paste into your application.
Bugreport & Contribution
If you find a bug, please either create a ticket in GitHub, or initiate a pull request.
Versioning
We adhere to semantic (major.minor.patch) versioning (https://semver.org/). This means that:
- Patch (x.x.patch) versions fix bugs
- Minor (x.minor.x) versions introduce new, backwards compatible features or improve existing code.
- Major (major.x.x) versions introduce radical changes which are not backwards compatible.
In your automation or procedure you can always safely update patch & minor versions without the risk of your application failing.
Testing
There are two test suites in phpunit.xml:
- default – Fast, Offline unit tests (HTTP is mocked). This is what CI runs on every change and it does not require credentials.
- integration – talks to the real Pingen Staging API. Is excluded from running in CI and every test is tagged
#[Group('integration')].
Prepare the docker image and composer:
docker-compose build
docker-compose run --rm php composer install
Running the unit tests (Http Mocked)
docker-compose run --rm php vendor/bin/phpunit
Running the integration tests (Live calls against Pingen Staging API, Credentials required in .env)
# Run whole integration suite
docker-compose run --rm php vendor/bin/phpunit --testsuite integration
# Run a single integration test file
docker-compose run --rm php vendor/bin/phpunit tests/Integration/LettersIntegrationTest.php
# Run a single test method
docker-compose run --rm php vendor/bin/phpunit --filter testCreateLetter
Integration test Credentials
Credentials come from a .env file in the repository root (copy .env.example and replace with your values)
Without PINGEN2_CLIENT_ID / PINGEN2_CLIENT_SECRET the whole integration suite is skipped (not failed).
Static analysis and style
docker-compose run --rm php vendor/bin/parallel-lint --exclude vendor .
docker-compose run --rm php vendor/bin/ecs check src
docker-compose run --rm php vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=512M
Testing without Docker
We highly recommend to use our prepared docker image for running tests to ensure all necessary packages and versions are available. However if you prefer you can always install anything necessary locally and run all commands without the docker-compose run --rm php prefix
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 2.24.0 | ^8.2| | ^10.0| | BSD-3-Clause | |
| 2.23.0 | ^8.2| | ^10.0| | BSD-3-Clause | |
| 2.22.0 | ^8.2| | ^10.0| | BSD-3-Clause | |
| 2.21.1 | ^8.2| | ^10.0| | BSD-3-Clause | |
| 2.21.0 | ^8.2| | ^10.0| | BSD-3-Clause | |
| 2.20.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.19.1 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.19.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.18.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.17.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.16.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.15.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.14.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.13.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.12.1 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.12.0 | ^8.1| | ^10.0| | BSD-3-Clause | |
| 2.11.0 | ^8.0| | ^9.0| | BSD-3-Clause | |
| 2.10.0 | ^8.0| | ^9.0| | BSD-3-Clause | |
| 2.9.0 | ^8.0| | ^9.0| | BSD-3-Clause | |
| 2.8.0 | ^8.0| | ^9.0| | BSD-3-Clause | |
| 2.7.0 | ^8.0| | ^9.0| | BSD-3-Clause | |
| 2.6.0 | ^7.4| | ^8.17| | BSD-3-Clause | |
| 2.5.0 | ^7.4| | ^8.17| | BSD-3-Clause | |
| 2.4.0 | ^7.4| | ^8.17| | BSD-3-Clause | |
| 2.3.0 | ^7.4| | ^8.17| | BSD-3-Clause | |
| 2.2.0 | ^7.4| | ^8.17| | BSD-3-Clause | |
| 2.1.0 | ^7.4| | ^8.17 | BSD-3-Clause | |
| 2.0.0 | ^7.4 | ^8.17 | BSD-3-Clause | |
| 0.3.0 | ^7.4 | ^8.17 | BSD-3-Clause | |
| 0.2.1 | ^7.4 | ^8.17 | BSD-3-Clause |
Showing the latest 30 of 32. See every release on Packagist