PHPackages                             dividebv/postnl - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. dividebv/postnl

ActiveLibrary[HTTP &amp; Networking](/categories/http)

dividebv/postnl
===============

Library to connect to PostNL's SOAP service called CIF

v2.0.2(4y ago)34354.1k↓36.8%38[1 issues](https://github.com/DivideBV/Postnl/issues)[4 PRs](https://github.com/DivideBV/Postnl/pulls)GPL-2.0-or-laterPHPPHP &gt;=7.0

Since Jun 30Pushed 2y ago9 watchersCompare

[ Source](https://github.com/DivideBV/Postnl)[ Packagist](https://packagist.org/packages/dividebv/postnl)[ RSS](/packages/dividebv-postnl/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (27)Used By (0)

PostNL CIF
==========

[](#postnl-cif)

[![Latest Stable Version](https://camo.githubusercontent.com/2650ad6241bbf6415c1eeea546ea909498d2d812efaae3c2f5e4f58c4ce4f2bb/68747470733a2f2f706f7365722e707567782e6f72672f64697669646562762f706f73746e6c2f762f737461626c65)](https://packagist.org/packages/dividebv/postnl)[![Total Downloads](https://camo.githubusercontent.com/1b2d12a51bd7c8e60a03465a32e5e46e6bab95ab3f39afaacaf009c6d8a83f11/68747470733a2f2f706f7365722e707567782e6f72672f64697669646562762f706f73746e6c2f646f776e6c6f616473)](https://packagist.org/packages/dividebv/postnl)[![Latest Unstable Version](https://camo.githubusercontent.com/fbd6cf4f5f7403f5e0db8c9912a774567b334a00f72dacb789ec8712a4318f85/68747470733a2f2f706f7365722e707567782e6f72672f64697669646562762f706f73746e6c2f762f756e737461626c65)](https://packagist.org/packages/dividebv/postnl)[![License](https://camo.githubusercontent.com/2e3dafd566fbae504b33fb1cfba8d29aa2d008fac3189ab302b8a343894c5e7a/68747470733a2f2f706f7365722e707567782e6f72672f64697669646562762f706f73746e6c2f6c6963656e7365)](https://packagist.org/packages/dividebv/postnl)

This is a library to interface with the SOAP services offered by [PostNL](http://postnl.nl/), called CIF.

New authorization
=================

[](#new-authorization)

Since version 2.0 of this library, the new authorization method (using tokens instead of username/password) is used.

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

[](#installation)

Install the latest version with

```
composer require dividebv/postnl
```

Implementation Status
=====================

[](#implementation-status)

This library is not complete. This table lists which services are implemented and which aren't. The list of existing services is taken from [PostNL's developer center](https://developer.postnl.nl/).

ServiceImplementedVersion**Addresses €**Adrescheck Nationaal✗N/AAdrescheck Basis Nationaal✗N/AAdrescheck Internationaal✗N/APersoon op Adrescheck Basis✗N/AGeo Adrescheck Nationaal✗N/A**Creditworthiness &amp; Business information €**Bedrijfscheck Nationaal✗N/AFraudepreventie Check Basis✗N/AIBANcheck Nationaal✗N/AKredietcheck Consument Basis✗N/AKredietcheck Consument Premium✗N/AKredietcheck Zakelijk✗N/A**Send &amp; Track**Barcode webservice✓1\_1Confirming webservice✓1\_9Labelling webservice✓2\_0Shippingstatus webservice✓1\_6**Delivery options**Deliverydate webservice✓2\_1Location webservice✓2\_1Timeframe webservice✓2\_0**Mail**Bulkmail webservice✗N/AExample
=======

[](#example)

```
use DivideBV\Postnl\Postnl;
use DivideBV\Postnl\ComplexTypes;

// Create client class using credentials received from PostNL.
$client = new Postnl(
    12345678,   // Customer number
    'ABCD',     // Customer code
    'Acme BV',  // Customer name
    'xxxxxxxx', // API key
    123456,     // Collection location
    'CD1234',   // Globalpack
    true        // Whether to use PostNL's sandbox environment.
);

/**
 * Jan Smit
 * Smit & Zonen
 * Hoofdstraat 1A
 * 1234 AB Heikant
 * The Netherlands
 */
$receiverAddress = ComplexTypes\Address::create()
    ->setAddressType('01')
    ->setFirstName('Jan')
    ->setName('Smit')
    ->setCompanyName('Smit & Zonen')
    ->setStreet('Hoofdstraat')
    ->setHouseNr('1')
    ->setHouseNrExt('A')
    ->setZipcode('1234AB')
    ->setCity('Heikant')
    ->setCountrycode('NL');

$senderAddress = ComplexTypes\Address::create()
    ->setAddressType('02')
    ->setFirstName('Robert')
    ->setName('Jansen')
    ->setCompanyName('Jansen & Janssen')
    ->setStreet('Hoofdstraat')
    ->setHouseNr('999')
    ->setHouseNrExt('B')
    ->setZipcode('1234AB')
    ->setCity('Heikant')
    ->setCountrycode('NL');

// Request a barcode from PostNL.
$barcode = $client->generateBarcodeByDestination($receiverAddress->getCountryCode());

// Create a shipment.
$shipment = ComplexTypes\Shipment::create()
    ->setAddresses(new ComplexTypes\ArrayOfAddress([
        $receiverAddress,
        $senderAddress,
    ]))
    ->setBarcode($barcode)
    ->setDimension(ComplexTypes\Dimension::create()
        ->setWeight(5000) // Weight in g
        ->setWidth(215)   // Width in mm
        ->setLength(305)  // Length in mm
        ->setHeight(280)  // Height in mm
    )
    ->setProductCodeDelivery('3085');

// Generate label and confirm shipment.
$result = $client->generateLabel($shipment);

// Save the label PDF locally.
$label = $result->getLabels()[0];
$file = new \SplFileObject("label.pdf", 'w');
$file->fwrite($label->getContent());
```

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 75.2% 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 ~100 days

Recently: every ~276 days

Total

24

Last Release

1723d ago

Major Versions

v0.11.0 → v1.0.02016-08-25

v1.2.1 → v2.0.0-beta12018-09-14

PHP version history (3 changes)v0.5.0PHP ^5.4

v0.6.0PHP 5.4 - 7

v2.0.1PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/859737?v=4)[Ameen Ross](/maintainers/ameenross)[@ameenross](https://github.com/ameenross)

---

Top Contributors

[![ameenross](https://avatars.githubusercontent.com/u/859737?v=4)](https://github.com/ameenross "ameenross (109 commits)")[![Jomaanro](https://avatars.githubusercontent.com/u/5111622?v=4)](https://github.com/Jomaanro "Jomaanro (10 commits)")[![wvdongen](https://avatars.githubusercontent.com/u/1862615?v=4)](https://github.com/wvdongen "wvdongen (6 commits)")[![slokhorst](https://avatars.githubusercontent.com/u/8083666?v=4)](https://github.com/slokhorst "slokhorst (5 commits)")[![annuh](https://avatars.githubusercontent.com/u/2487949?v=4)](https://github.com/annuh "annuh (4 commits)")[![thijsbekke](https://avatars.githubusercontent.com/u/1152678?v=4)](https://github.com/thijsbekke "thijsbekke (3 commits)")[![JeroenBakker](https://avatars.githubusercontent.com/u/1167406?v=4)](https://github.com/JeroenBakker "JeroenBakker (2 commits)")[![MPaap](https://avatars.githubusercontent.com/u/10021557?v=4)](https://github.com/MPaap "MPaap (1 commits)")[![phamels](https://avatars.githubusercontent.com/u/8149258?v=4)](https://github.com/phamels "phamels (1 commits)")[![media253](https://avatars.githubusercontent.com/u/28750663?v=4)](https://github.com/media253 "media253 (1 commits)")[![stephan-cream](https://avatars.githubusercontent.com/u/12713337?v=4)](https://github.com/stephan-cream "stephan-cream (1 commits)")[![kim-dongit](https://avatars.githubusercontent.com/u/17615168?v=4)](https://github.com/kim-dongit "kim-dongit (1 commits)")[![digipact](https://avatars.githubusercontent.com/u/10134219?v=4)](https://github.com/digipact "digipact (1 commits)")

---

Tags

phppostnlpostnl-cifsoap-services

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dividebv-postnl/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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