PHPackages                             wundii/afterbuy-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. wundii/afterbuy-sdk

ActiveLibrary[API Development](/categories/api)

wundii/afterbuy-sdk
===================

Modern PHP 8.2+ Afterbuy Programming Interface Software Development Kit

1.0.4(3mo ago)41.5k—6.3%[1 PRs](https://github.com/wundii/afterbuy-sdk/pulls)1MITPHPPHP &gt;=8.2CI passing

Since Apr 7Pushed 1mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (16)Versions (41)Used By (1)

afterbuy-sdk
============

[](#afterbuy-sdk)

[![AfterbuyShopApi](https://camo.githubusercontent.com/ab60ff585e84e6c113d1648b30021f87ac1f61361df49712257fb660e0984e7a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f416674657262757925323053686f702d2d4150492d56657273696f6e253230312e37372e3234382d79656c6c6f772e7376673f7374796c653d666f722d7468652d6261646765)](https://xmldoku.afterbuy.de/shopdoku)[![AfterbuyXmlApi](https://camo.githubusercontent.com/89ed7a30774323cdc4ebeb3871d24cdbe345693afe4f221401c9384b00b24863/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4166746572627579253230584d4c2d2d4150492d56657273696f6e253230322e302e3436302d79656c6c6f772e7376673f7374796c653d666f722d7468652d6261646765)](https://xmldoku.afterbuy.de/dokued)[![PHP-Tests](https://camo.githubusercontent.com/80a322d48e30ccb8806b37bc9e67e2b5b42c947ce8c522c508dcad880d234008/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f77756e6469692f61667465726275792d73646b2f636f64655f7175616c6974792e796d6c3f6272616e63683d6d61696e267374796c653d666f722d7468652d6261646765)](https://github.com/wundii/afterbuy-sdk/actions/workflows/code_quality.yml)[![PHPStan](https://camo.githubusercontent.com/e15d364c7c0af383f9784d4af8419c1fcd87fbb5b44f0d48e32ce327be958008/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c25323031302d627269676874677265656e2e7376673f7374796c653d666f722d7468652d6261646765)](https://phpstan.org/)[![VERSION](https://camo.githubusercontent.com/802e9a801b167b598bbb0a9c59756a26a59c1c39439fc93876767205639a18e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77756e6469692f61667465726275792d73646b3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/802e9a801b167b598bbb0a9c59756a26a59c1c39439fc93876767205639a18e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77756e6469692f61667465726275792d73646b3f7374796c653d666f722d7468652d6261646765)[![PHP](https://camo.githubusercontent.com/5cde321809d225d3762fcf3b6ca5eefb701ca985763a52b21b867102e0bde932/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f77756e6469692f61667465726275792d73646b3f7374796c653d666f722d7468652d6261646765)](https://www.php.net/)[![Rector](https://camo.githubusercontent.com/bd6dd5b52a4347de5aa8bd284d980f474d87da595a4c90d3300b9645c2bcbf7f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526563746f722d382e322d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](https://getrector.com)[![ECS](https://camo.githubusercontent.com/0f7ade62b75eb86dd60ed170f954932994f60c2b4678e94ad0c7a892d31d77b8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4543532d636865636b2d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](https://tomasvotruba.com/blog/zen-config-in-ecs)[![PHPUnit](https://camo.githubusercontent.com/729283066c222d92f175922debb3efc12d423e06e2880f6cc08e9c8601764ff3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2d556e69742d636865636b2d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](https://phpunit.org)[![codecov](https://camo.githubusercontent.com/9ad841ace883b11adaa23ac28d80d4671e40303b74c02f7eee77cd06522aaa02/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f77756e6469692f61667465726275792d73646b2f6d61696e3f746f6b656e3d55585238554243584d4b267374796c653d666f722d7468652d6261646765)](https://codecov.io/github/wundii/afterbuy-sdk)[![PSR3](https://camo.githubusercontent.com/a73b4a067d619ad711039e8c9aaa8f5e6ef6fa57df52c51ab22d55b2af3ccd10/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d2d332532304c6f676765722d6f7074696f6e616c2d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](https://php-fig.org/psr/psr-3)[![Downloads](https://camo.githubusercontent.com/746db989a053e33558a9245ac2489665af3f302a2bdac9add9a4f20ca20243d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77756e6469692f61667465726275792d73646b2e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/wundii/afterbuy-sdk)

This is a modern Afterbuy Programming Interface Software Development Kit, for the selling solution [afterbuy.de](https://www.afterbuy.de/).

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

[](#requirements)

- PHP 8.2 or higher
- ext-dom
- ext-json
- ext-reflection
- ext-simplexml
- ext-xml

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

[](#installation)

Require the bundle and its dependencies with composer:

> composer require wundii/afterbuy-sdk

### Installations for frameworks

[](#installations-for-frameworks)

- Laravel Package is in development
- [Symfony Bundle](https://github.com/wundii/afterbuy-sdk-symfony-bundle)

Afterbuy API Documentation
--------------------------

[](#afterbuy-api-documentation)

- [Shop API Documentation](https://xmldoku.afterbuy.de/shopdoku/)
- [XML API Documentation](https://xmldoku.afterbuy.de/dokued/)

### Current Afterbuy API Informations

[](#current-afterbuy-api-informations)

- last update 2.0.460 was recalled by Afterbuy, current version is 2.0.459
    - the afterbuy sdk is compatible with the recalled version 2.0.460

### Supported Requests with Examples

[](#supported-requests-with-examples)

- [CreateShopOrder](examples/CreateShopOrder.md)
- [GetAfterbuyTime](examples/GetAfterbuyTime.md)
- [GetListerHistory](examples/GetListerHistory.md)
- [GetMailTemplates](examples/GetMailTemplates.md)
- [GetPaymentServices](examples/GetPaymentServices.md)
- [GetProductDiscounts](examples/GetProductDiscounts.md)
- [GetShippingCost](examples/GetShippingCost.md)
- [GetShippingServices](examples/GetShippingServices.md)
- [GetShopCatalogs](examples/GetShopCatalogs.md)
- [GetShopProducts](examples/GetShopProducts.md)
- [GetSoldItems](examples/GetSoldItems.md)
- [GetStockInfo](examples/GetStockInfo.md)
- [GetTranslatedMailTemplate](examples/GetTranslatedMailTemplate.md)
- [UpdateCatalogs](examples/UpdateCatalogs.md)
- [UpdateShopProducts](examples/UpdateShopProducts.md)
- [UpdateSoldItems](examples/UpdateSoldItems.md)

Afterbuy Sandbox Environment
----------------------------

[](#afterbuy-sandbox-environment)

```
use Wundii\AfterbuySdk\Core\Afterbuy;
use Wundii\AfterbuySdk\Core\AfterbuyGlobal;
use Wundii\AfterbuySdk\Dto\UpdateShopProducts;
use Wundii\AfterbuySdk\Enum\Core\EndpointEnum;

$afterbuyGlobal = new AfterbuyGlobal(
    '123...',
    '456...',
    EndpointEnum::SANDBOX,
);

$afterbuy = new Afterbuy(
    $afterbuyGlobal,
);

$afterbuy->runRequest(
    new UpdateShopProducts(
        ... // afterbuy sdk request object
    ),
);
```

According to the Afterbuy documentation, the scheme should be changed from https to http for the test environment. However, this is currently not working as expected - all changes continue to affect the production environment. This afterbuy sdk always returns default a successful response if it is an update request. Alternatively, you can pass your own update response class.

```
use Wundii\AfterbuySdk\Core\Afterbuy;
use Wundii\AfterbuySdk\Core\AfterbuyGlobal;
use Wundii\AfterbuySdk\Core\SandboxResponse;
use Wundii\AfterbuySdk\Dto\UpdateShopProducts;
use Wundii\AfterbuySdk\Enum\Core\EndpointEnum;

$afterbuyGlobal = new AfterbuyGlobal(
    '123...',
    '456...',
    EndpointEnum::SANDBOX,
);

$afterbuy = new Afterbuy(
    $afterbuyGlobal,
);

/** your own response version */
$afterbuy->runRequest(
    new UpdateShopProducts(
        ... // afterbuy sdk request object
    ),
    new SandboxResponse('', 200),
);
```

Usage
-----

[](#usage)

```
use Wundii\AfterbuySdk\Core\Afterbuy;
use Wundii\AfterbuySdk\Core\AfterbuyGlobal;
use Wundii\AfterbuySdk\Enum\Core\EndpointEnum;
use Wundii\AfterbuySdk\Request\GetAfterbuyTimeRequest;

$afterbuyGlobal = new AfterbuyGlobal(
    accountToken: '123...',
    partnerToken: '456...',
    EndpointEnum::SANDBOX,
);

$request = new GetAfterbuyTimeRequest();

$afterbuy = new Afterbuy(
    $afterbuyGlobal,
    Optional_PsrLoggerInterface::class,
);
$response = $afterbuy->runRequest($request);

$response->getStatusCode();
$response->getCallStatus();
$response->getInfo();
$response->getResult();
$response->getXmlResponse()
$response->getErrorMessages();
$response->getWarningMessages();
```

Development for Afterbuy SDK
----------------------------

[](#development-for-afterbuy-sdk)

### composer scripts

[](#composer-scripts)

```
composer cache-clear
composer ecs-apply
composer ecs-dry
composer phpstan
composer rector-apply
composer rector-dry
composer unittest
```

### complete checks before merge

[](#complete-checks-before-merge)

```
composer complete-check
```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 54% 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 ~10 days

Recently: every ~18 days

Total

32

Last Release

96d ago

Major Versions

0.25.0 → 1.0.02025-12-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/55cca8c4c5dafd979e8cfc4fc14747edc8e7abeda94074b5fa927b7687af55f9?d=identicon)[wundii](/maintainers/wundii)

---

Top Contributors

[![wundii](https://avatars.githubusercontent.com/u/58734845?v=4)](https://github.com/wundii "wundii (27 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (23 commits)")

---

Tags

afterbuyphpsdkshop-apixml-apisdkafterbuy

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wundii-afterbuy-sdk/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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