PHPackages                             baltpeter/internetmarke-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. baltpeter/internetmarke-php

AbandonedArchivedLibrary[API Development](/categories/api)

baltpeter/internetmarke-php
===========================

A simple PHP wrapper for the Deutsche Post Internetmarke web service

v0.5.0(7y ago)3761.8k↓46.2%7[1 issues](https://github.com/baltpeter/internetmarke-php/issues)[1 PRs](https://github.com/baltpeter/internetmarke-php/pulls)MITPHP

Since Mar 27Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/baltpeter/internetmarke-php)[ Packagist](https://packagist.org/packages/baltpeter/internetmarke-php)[ RSS](/packages/baltpeter-internetmarke-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

internetmarke-php – Simple PHP wrapper for the Internetmarke API
================================================================

[](#internetmarke-php--simple-php-wrapper-for-the-internetmarke-api)

> Simple PHP wrapper for the 1C4A (“OneClickForApplikation”) web service for the Internetmarke provided by Deutsche Post (DPAG).

Caution

Deutsche Post will [sunset](https://developer.dhl.com/api-reference/deutsche-post-internetmarke-post-parcel-germany?lang=en#additional-information-section/deprecation-schedule) the SOAP API that this library uses on December 31, 2025. Afterwards, this library will stop working. It won't be maintained anymore.

[![Ordering a stamp using internetmarke-php](https://camo.githubusercontent.com/f963467dd700e88bfe60b24f6dbbf44d168c89c07f03aee9882308e9abd8279d/68747470733a2f2f7374617469632e626e2e616c2f696d672f696e7465726e65746d61726b652d7068702d6865726f2e737667)](https://camo.githubusercontent.com/f963467dd700e88bfe60b24f6dbbf44d168c89c07f03aee9882308e9abd8279d/68747470733a2f2f7374617469632e626e2e616c2f696d672f696e7465726e65746d61726b652d7068702d6865726f2e737667)

This project’s main purpose is to be able to order Deutsche Post stamps directly from your own applications. The payment is handled via the Portokasse, a prepaid wallet service also by Deutsche Post.

The web service by Deutsche Post is a custom SOAP API (see the WSDL here: ). This project aims to abstract the SOAP nature away and provide a PHP API, while still adhering to the structure defined by DPAG. Do note that this is only a very thin wrapper around the SOAP API and the user still has to follow DPAG’s [specification](https://www.deutschepost.de/de/i/internetmarke-porto-drucken/downloads.html).

Requirements
------------

[](#requirements)

To access the web service, you will need to register as a partner with DPAG. This can either be done via their [website](https://www.deutschepost.de/de/i/internetmarke-porto-drucken/geschaeftskunden.html) (German only) or by contacting . They ask you to fill out following [form](https://www.deutschepost.de/content/dam/dpag/images/i_i/Internetmarke/partnerwerden/dp-internetmarke-anmeldebogen-api-anbindung.pdf). So keep in mind to fill it out first. (German only).
They will send you the documentation for the web service and create your personal credentials (consisting of: your partner ID, a secret key called `SCHLUESSEL_DPWN_MARKTPLATZ`, and a key phase which is usually `1`).

In addition, you will need to have an account for the [Portokasse service](https://portokasse.deutschepost.de/portokasse/#!/). This is a prepaid wallet from which your purchase totals will be deducted.
After registering, you can access the service with your username (email address) and password.

Installation
------------

[](#installation)

The package is available via Composer. To install the latest version from Packagist, run:

```
composer require baltpeter/internetmarke-php

```

Basic Usage
-----------

[](#basic-usage)

All actions provided by the web service are implemented in the `baltpeter\Internetmarke\Service` class.

This example shows you how to order a single stamp for a domestic letter. Other actions and parameters are documented with phpDoc. For more examples, please refer to the [wiki](https://github.com/baltpeter/internetmarke-php/wiki/Examples).

```
// The `PartnerInformation` object is used to authenticate you as a partner with DPAG.
$partner_info = new \baltpeter\Internetmarke\PartnerInformation('ABCDE', 1, 'yoursecretkey');
// The `Service` object provides an interface for all actions in the web service.
$service = new \baltpeter\Internetmarke\Service($partner_info);

// First, we need to get a token for our Portokasse user.
$user_token = $service->authenticateUser('portokasse@yourmailserver.tld', 'yourpassword')->getUserToken();

// Next, we create an `OrderItem` which holds the details of the stamp we want to purchase.
$order_item = new \baltpeter\Internetmarke\OrderItem(1, null, null,
    new \baltpeter\Internetmarke\Position(1, 1, 1), 'FrankingZone');

// Finally, we call `checkoutShoppingCartPdf()` which creates the order and actually
// deducts the money from your Portokasse.
// The last parameter in this example is the total cost in eurocents, which you have to calculate
// manually. This value *has* to be correct, it is checked on the server side.
var_dump($service->checkoutShoppingCartPdf($user_token, 1, array($order_item), 80));
```

Running this code will print a result similar to this:

```
object(stdClass)#10 (3) {
  ["link"]=>
  string(111) "https://internetmarke.deutschepost.de/PcfExtensionWeb/document?keyphase=0&data=abcdefghijklmopqrstuvwxyz"
  ["walletBallance"]=>
  int(236725)
  ["shoppingCart"]=>
  object(stdClass)#11 (2) {
    ["shopOrderId"]=>
    string(9) "12345678"
    ["voucherList"]=>
    object(stdClass)#12 (1) {
      ["voucher"]=>
      array(1) {
        [0]=>
        object(stdClass)#13 (1) {
          ["voucherId"]=>
          string(20) "A0011E78E1000001234A"
        }
      }
    }
  }
}
```

Note how we wrapped the `$order_item` in an array. If you want to order multiple stamps, just include more `OrderItem`s in that array.

The stamp in the linked PDF will look something like this:

[![The generated stamp](https://camo.githubusercontent.com/44ca8aae32571c4426bb352d14eb58aaf4ec7e9537e50ec9a2fc7507f11eaea3/68747470733a2f2f7374617469632e626e2e616c2f696d672f696e7465726e65746d61726b652d7068702d7374616d702d6578616d706c652e706e67)](https://camo.githubusercontent.com/44ca8aae32571c4426bb352d14eb58aaf4ec7e9537e50ec9a2fc7507f11eaea3/68747470733a2f2f7374617469632e626e2e616c2f696d672f696e7465726e65746d61726b652d7068702d7374616d702d6578616d706c652e706e67)

Again, please refer to the [wiki](https://github.com/baltpeter/internetmarke-php/wiki/Examples) for more examples.

License
-------

[](#license)

internetmarke-php is licensed under the MIT license, see the `LICENSE` file for details. Pull requests are welcome!

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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 ~171 days

Recently: every ~213 days

Total

6

Last Release

2575d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f32209200fa6ad616d06094246385a16b9b68ad214763cc0b8978b5c1816a60?d=identicon)[baltpeter](/maintainers/baltpeter)

---

Top Contributors

[![baltpeter](https://avatars.githubusercontent.com/u/4048809?v=4)](https://github.com/baltpeter "baltpeter (14 commits)")[![niels-numbers](https://avatars.githubusercontent.com/u/1765602?v=4)](https://github.com/niels-numbers "niels-numbers (5 commits)")[![Deltachaos](https://avatars.githubusercontent.com/u/679561?v=4)](https://github.com/Deltachaos "Deltachaos (1 commits)")

---

Tags

1c4adeprecateddeutsche-posthacktoberfestinternetmarkephpstamp

### Embed Badge

![Health badge](/badges/baltpeter-internetmarke-php/health.svg)

```
[![Health](https://phpackages.com/badges/baltpeter-internetmarke-php/health.svg)](https://phpackages.com/packages/baltpeter-internetmarke-php)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k971.0M166.4k](/packages/phpunit-phpunit)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k12.6M140](/packages/dedoc-scramble)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M535](/packages/pimcore-pimcore)[spiral/framework

Spiral, High-Performance PHP/Go Framework

2.1k2.3M72](/packages/spiral-framework)[azuracast/azuracast

The AzuraCast self-hosted web radio station management suite.

4.0k27.9k](/packages/azuracast-azuracast)[oro/platform

Business Application Platform (BAP)

645146.3k118](/packages/oro-platform)

PHPackages © 2026

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