PHPackages                             postnl/postnl-ecommerce-sdk - 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. postnl/postnl-ecommerce-sdk

ActiveLibrary[API Development](/categories/api)

postnl/postnl-ecommerce-sdk
===========================

Collection of PostNL API's for ecommerce processes.

1.0.5(1y ago)07.8k↓30%MITPHPPHP ^7.2 || ^8.0

Since Mar 27Pushed 1y ago2 watchersCompare

[ Source](https://github.com/postnl/postnl-ecommerce-sdk-php)[ Packagist](https://packagist.org/packages/postnl/postnl-ecommerce-sdk)[ Docs](https://developer.postnl.nl/docs)[ RSS](/packages/postnl-postnl-ecommerce-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

Getting Started with Postnl-Ecommerce
=====================================

[](#getting-started-with-postnl-ecommerce)

Introduction
------------

[](#introduction)

**PostNL Ecommerce APIs**

Explore our technical documentation, test your integration and go live with PostNL service.

**Start using PostNL APIs for e-commerce processes**

To get to know the PostNL APIs better, read all about it in our [API overview](https://developer.postnl.nl/api-overview/). Learn everything you need to about our API's before embarking on integration with PostNL.

To connect to PostNL, you can request an API key via [Mijn PostNL](https://mijn.postnl.nl/c/BP2_Mod_Login.app?inresponseto=&RelayState=&startURL=%2F) portal. Choose your APIs and build your integration. Explore our guides, examples, and resources to guide you through each phase of integration and start testing. Ensure that you can make successful test calls towards all endpoints used in the solution.

Contact our integrations team to have your test calls reviewed and gain access to our API production environment. Once everything is configured and validated, you'll be ready to go live and start using the PostNL service.

For help contact us via our support form: [Need help? Submit a case | PostNL](https://developer.postnl.nl/support/form/).

Install the Package
-------------------

[](#install-the-package)

Run the following command to install the package and automatically add the dependency to your composer.json file:

```
composer require "postnl/postnl-ecommerce-sdk:1.0.5"
```

Or add it to the composer.json file manually as given below:

```
"require": {
    "postnl/postnl-ecommerce-sdk": "1.0.5"
}
```

You can also view the package at:

Test the SDK
------------

[](#test-the-sdk)

Unit tests in this SDK can be run using PHPUnit.

1. First install the dependencies using composer including the `require-dev` dependencies.
2. Run `vendor\bin\phpunit --verbose` from commandline to execute tests. If you have installed PHPUnit globally, run tests using `phpunit --verbose` instead.

You can change the PHPUnit test configuration in the `phpunit.xml` file.

Initialize the API Client
-------------------------

[](#initialize-the-api-client)

***Note:*** Documentation for the client can be found [here.](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/client.md)

The following parameters are configurable for the API Client:

ParameterTypeDescription`environment``Environment`The API environment.
 **Default: `Environment.PRODUCTION_SERVER`**`timeout``int`Timeout for API calls in seconds.
*Default*: `0``enableRetries``bool`Whether to enable retries and backoff feature.
*Default*: `false``numberOfRetries``int`The number of retries to make.
*Default*: `3``retryInterval``float`The retry time interval between the endpoint calls.
*Default*: `1``backOffFactor``float`Exponential backoff factor to increase interval between retries.
*Default*: `2``maximumRetryWaitTime``int`The maximum wait time in seconds for overall retrying requests.
*Default*: `0``retryOnTimeout``bool`Whether to retry on request timeout.
*Default*: `true``httpStatusCodesToRetry``array`Http status codes to retry against.
*Default*: `408, 413, 429, 500, 502, 503, 504, 521, 522, 524``httpMethodsToRetry``array`Http methods to retry against.
*Default*: `'GET', 'PUT'``customHeaderAuthenticationCredentials`[`CustomHeaderAuthenticationCredentials`](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/auth/custom-header-signature.md)The Credentials Setter for Custom Header SignatureThe API client can be initialized as follows:

```
$client = PostnlEcommerceClientBuilder::init()
    ->customHeaderAuthenticationCredentials(
        CustomHeaderAuthenticationCredentialsBuilder::init(
            'apikey'
        )
    )
    ->environment(Environment::PRODUCTION_SERVER)
    ->build();
```

Environments
------------

[](#environments)

The SDK can be configured to use a different environment for making API calls. Available environments are:

### Fields

[](#fields)

NameDescriptionProduction server**Default** Production serverNon-Production serverSandbox environment for testingAuthorization
-------------

[](#authorization)

This API uses the following authentication schemes.

- [`APIKeyHeader (Custom Header Signature)`](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/auth/custom-header-signature.md)

List of APIs
------------

[](#list-of-apis)

- [Postalcodecheck](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/postalcodecheck.md)
- [Barcode](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/barcode.md)
- [Checkout](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/checkout.md)
- [Confirming](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/confirming.md)
- [Deliverydate](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/deliverydate.md)
- [Labelling](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/labelling.md)
- [Locations](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/locations.md)
- [Shipment](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/shipment.md)
- [Shipping Status](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/shipping-status.md)
- [Timeframes](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/controllers/timeframes.md)

Classes Documentation
---------------------

[](#classes-documentation)

- [ApiException](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/api-exception.md)
- [ApiResponse](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/api-response.md)
- [HttpRequest](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/http-request.md)
- [HttpResponse](https://www.github.com/postnl/postnl-ecommerce-sdk-php/tree/1.0.5/doc/http-response.md)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance46

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

417d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3fe9f14c5627c873085753341d37c225e4eaf684c9ec494e95296f34e0e8bec9?d=identicon)[PostNL](/maintainers/PostNL)

---

Top Contributors

[![maarten-brijker-postnl](https://avatars.githubusercontent.com/u/115558693?v=4)](https://github.com/maarten-brijker-postnl "maarten-brijker-postnl (1 commits)")

---

Tags

apisdkecommercepostnl

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[square/square

Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.

793.4M21](/packages/square-square)

PHPackages © 2026

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