PHPackages                             pingencom/pingen2-sdk-php - 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. pingencom/pingen2-sdk-php

ActiveLibrary[API Development](/categories/api)

pingencom/pingen2-sdk-php
=========================

Official PHP Pingen SDK for API V2

2.20.0(5mo ago)31.1M↓43.5%8[1 PRs](https://github.com/pingencom/pingen2-sdk-php/pulls)BSD-3-ClausePHPPHP ^8.1|^8.2|^8.3|^8.4|^8.5CI passing

Since Mar 15Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/pingencom/pingen2-sdk-php)[ Packagist](https://packagist.org/packages/pingencom/pingen2-sdk-php)[ RSS](/packages/pingencom-pingen2-sdk-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (28)Used By (0)

Requirements
============

[](#requirements)

You need to have an account in pingen v2 and obtain oauth credentials for your desired grant type (usually client\_credentials).

How to obtain these are described here:

Installation
============

[](#installation)

Require the package via composer (Get composer here: )

`composer require pingencom/pingen2-sdk-php`

Environments
============

[](#environments)

We have two Environments available: Production and Staging (see )

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

[](#usage)

The simplest way to integrate is using the client credentials grant (see )

```
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 &amp; Docs
===================

[](#examples--docs)

Our API Docs are here:

On the right-hand side of every endpoint you can see request samples for PHP and other languages, which you can copy and paste into your application.

Bugreport &amp; Contribution
============================

[](#bugreport--contribution)

If you find a bug, please either create a ticket in github, or initiate a pull request.

Versioning
==========

[](#versioning)

We adhere to semantic (major.minor.patch) versioning (). 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 &amp; minor versions without the risk of your application failing.

Testing
=======

[](#testing)

PHPUnit: `vendor/bin/phpunit`

ECS: `vendor/bin/ecs check src`

PHPStan: `vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=512M`

Lint: `vendor/bin/parallel-lint --exclude vendor .`

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance82

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 87% 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 ~66 days

Recently: every ~49 days

Total

27

Last Release

152d ago

Major Versions

0.3.0 → 2.0.02021-12-21

PHP version history (6 changes)0.1.0PHP ^7.4

2.1.0PHP ^7.4|^8.0

2.7.0PHP ^8.0|^8.1|^8.2

2.12.0PHP ^8.1|^8.2|^8.3

2.14.0PHP ^8.1|^8.2|^8.3|^8.4

2.20.0PHP ^8.1|^8.2|^8.3|^8.4|^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/460053ba27c80e9a30e5086a86c66f691346e34fb37142c3269ee06ed7c6d0d2?d=identicon)[pingencom](/maintainers/pingencom)

---

Top Contributors

[![pingencom](https://avatars.githubusercontent.com/u/3940395?v=4)](https://github.com/pingencom "pingencom (67 commits)")[![onlime](https://avatars.githubusercontent.com/u/2759561?v=4)](https://github.com/onlime "onlime (5 commits)")[![SebastianVassiliou-cnic](https://avatars.githubusercontent.com/u/107954479?v=4)](https://github.com/SebastianVassiliou-cnic "SebastianVassiliou-cnic (2 commits)")[![maximetassy](https://avatars.githubusercontent.com/u/25178914?v=4)](https://github.com/maximetassy "maximetassy (1 commits)")[![mweghorst](https://avatars.githubusercontent.com/u/9582326?v=4)](https://github.com/mweghorst "mweghorst (1 commits)")[![Thijn](https://avatars.githubusercontent.com/u/845552?v=4)](https://github.com/Thijn "Thijn (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pingencom-pingen2-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/pingencom-pingen2-sdk-php/health.svg)](https://phpackages.com/packages/pingencom-pingen2-sdk-php)
```

###  Alternatives

[spatie/laravel-query-builder

Easily build Eloquent queries from API requests

4.4k26.9M220](/packages/spatie-laravel-query-builder)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[esign/laravel-conversions-api

A laravel wrapper package around the Facebook Conversions API

69145.4k](/packages/esign-laravel-conversions-api)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

113.8k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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