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

ActiveLibrary[API Development](/categories/api)

pricemotion/sdk
===============

Provides logic shared between Pricemotion integrations for PHP e-commerce systems

v1.2.2(3y ago)01.3k1MITPHPPHP &gt;=7.4

Since Feb 23Pushed 3y agoCompare

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

READMEChangelog (6)Dependencies (3)Versions (7)Used By (1)

Pricemotion SDK
===============

[](#pricemotion-sdk)

This SDK is used internally for Pricemotion's integrations with different e-commerce systems. It may also be used by customers to integrate with custom or unsupported systems.

Currently this SDK does not provide a complete interface for Pricemotion's API. What it does contain is logic for handling webhook requests, and for processing the XML returned by the Pricemotion API.

Links:

- [API documentation](https://pricemotion.github.io/sdk/doc/namespaces/pricemotion-sdk.html)

Getting started
---------------

[](#getting-started)

Installation is easy, whether you use Composer or not.

### With Composer

[](#with-composer)

Run:

```
composer require pricemotion/sdk

```

Make sure that `vendor/autoload.php` is `require`d in your scripts.

### Without Composer

[](#without-composer)

Download the source code from the [Releases page on GitHub](https://github.com/pricemotion/sdk/releases).

Extract it.

Require `autoload.php` in your scripts.

### Dependency injection

[](#dependency-injection)

If you use a framework that supports automatic dependency injection (autowiring) such as Symfony, or have manually integrated a dependency container such as PHP-DI in your project, you should be able to use it to automatically initialize most of the classes in this SDK.

Handling webhooks
-----------------

[](#handling-webhooks)

A cache is required for storing Pricemotion's public keys, so that they do not have to retrieved on each request. Any cache that implements [Symfony's cache contract](https://symfony.com/doc/current/components/cache.html) is supported.

For example, you might install `symfony/cache` using Composer and initialize it as follows:

```
use Symfony\Component\Cache\Adapter\FilesystemAdapter;

$cache = new FilesystemAdapter();
```

With the cache ready, you can decode incoming webhook requests as follows:

```
use Pricemotion\Sdk\Crypto\SignatureVerifier;
use Pricemotion\Sdk\Api\WebhookRequestFactory;

$body = file_get_contents('php://input');

$signatureVerifier = new SignatureVerifier($cache);
$webhookRequestFactory = new WebhookRequestFactory($signatureVerifier);
$webhookRequest = $webhookRequestFactory->createFromRequestBody($body);
$product = $webhookRequest->getProduct();
```

Using product data
------------------

[](#using-product-data)

Getting the EAN:

```
$product->getEan()->toString();
```

Getting the product name:

```
$product->getName();
```

Getting the price statistics:

```
$product->getLowestPrice();
$product->getAveragePrice();
$product->getMedianPrice();
$product->getHighestPrice();
```

Getting the offers ranked from lowest to highest price:

```
foreach ($product->getOffers() as $offer) {
  $offer->getSeller();
  $offer->getPrice();
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Every ~33 days

Recently: every ~41 days

Total

6

Last Release

1377d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ac19cfdc39afe4a0bd82431db312dab301aca07f63c201bb05730b2e34794a9?d=identicon)[kiboit](/maintainers/kiboit)

---

Top Contributors

[![apeschar](https://avatars.githubusercontent.com/u/122977?v=4)](https://github.com/apeschar "apeschar (41 commits)")

---

Tags

apiphppricemotionsdk

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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