PHPackages                             antistatique/trustedshops-php-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. antistatique/trustedshops-php-sdk

ActiveLibrary[API Development](/categories/api)

antistatique/trustedshops-php-sdk
=================================

Super-simple, minimum abstraction TrustedShops API v2.x wrapper, in PHP

1.1.0(1y ago)334.8k↓40%4[1 PRs](https://github.com/antistatique/trustedshops-php-sdk/pulls)MITPHPPHP &gt;=8.0

Since Sep 27Pushed 1y ago2 watchersCompare

[ Source](https://github.com/antistatique/trustedshops-php-sdk)[ Packagist](https://packagist.org/packages/antistatique/trustedshops-php-sdk)[ Docs](https://github.com/antistatique/trustedshops-php-sdk)[ RSS](/packages/antistatique-trustedshops-php-sdk/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelog (3)Dependencies (8)Versions (7)Used By (0)

TrustedShops PHP SDK
====================

[](#trustedshops-php-sdk)

Super-simple, minimum abstraction TrustedShops API v2.x wrapper, in PHP.

I hate complex wrappers. This lets you get from the TrustedShops API docs to the code as directly as possible.

[![Build](https://github.com/antistatique/trustedshops-php-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/antistatique/trustedshops-php-sdk/actions/workflows/tests.yml)[![Coverage Status](https://camo.githubusercontent.com/8af6e3ae391f5cb282cc88fc3a2a3921b1b830f061116a22c4ed34d6ada99781/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616e746973746174697175652f7472757374656473686f70732d7068702d73646b2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/antistatique/trustedshops-php-sdk?branch=master)[![Packagist](https://camo.githubusercontent.com/6ae487879479aa97b3c77fc07c2624483c408351e3ef9f307ac576a01de27b9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e746973746174697175652f7472757374656473686f70732d7068702d73646b2e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/antistatique/trustedshops-php-sdk)[![License](https://camo.githubusercontent.com/ee751dea653638beb1ecbd9e9bacdcd2e2f086c18a6db2c8d3275c837726ad04/68747470733a2f2f706f7365722e707567782e6f72672f616e746973746174697175652f7472757374656473686f70732d7068702d73646b2f6c6963656e7365)](https://packagist.org/packages/antistatique/trustedshops-php-sdk)[![PHP Versions Supported](https://camo.githubusercontent.com/905c670b6e3bc20026bddbc8923df4d38111e526b88f1252ac4ceb6643299d96/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e302d3838393242462e737667)](https://packagist.org/packages/antistatique/trustedshops-php-sdk)

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

[](#getting-started)

You can install `trustedshops-php-sdk` using Composer:

```
composer require antistatique/trustedshops-php-sdk

```

Examples
--------

[](#examples)

See the `examples/` directory for examples of the key client features. You can view them in your browser by running the php built-in web server.

```
php -S localhost:8000 -t examples/
```

And then browsing to the host and port you specified (in the above example, `http://localhost:8000`).

### Basic Example

[](#basic-example)

Start by `use`-ing the class and creating an instance with your API key

```
use \Antistatique\TrustedShops\TrustedShops;
```

### List all the shops (with a `public` call via `get` on the `shops/{tsid}` method)

[](#list-all-the-shops-with-a-public-call-via-get-on-the-shopstsid-method)

```
$tsid = 'abc123abc123abc123abc123abc123';
$ts = new TrustedShops();
$response = $ts->get("shops/$tsid");
print_r($response);
```

### Get all reviews (with a `public` call via `get` to the `lists/{listID}/reviews` method)

[](#get-all-reviews-with-a-public-call-via-get-to-the-listslistidreviews-method)

```
$tsid = 'abc123abc123abc123abc123abc123';
$ts = new TrustedShops();
$response = $ts->get("shops/$tsid/reviews");
print_r($response);
```

### Read measurement matrix of review complaint indicator for a shop (with a `restricted` authenticated call via `get` on the `shops/{tsid}/quality/complaints` method)

[](#read-measurement-matrix-of-review-complaint-indicator-for-a-shop-with-a-restricted-authenticated-call-via-get-on-the-shopstsidqualitycomplaints-method)

Update a list member with more information (using `patch` to update):

```
$tsid = 'abc123abc123abc123abc123abc123';
$ts = new TrustedShops('restricted');
$ts->setApiCredentials( 'SECRET_USER', 'SECRET_PASSWORD');
$response = $ts->get("shops/$tsid/quality/complaints");
print_r($response);
```

Troubleshooting
---------------

[](#troubleshooting)

To get the last error returned by either the HTTP client or by the API, use `getLastError()`:

```
echo $ts->getLastError();
```

For further debugging, you can inspect the headers and body of the response:

```
print_r($ts->getLastResponse());
```

If you suspect you're sending data in the wrong format, you can look at what was sent to TrustedShops by the wrapper:

```
print_r($ts->getLastRequest());
```

If your server's CA root certificates are not up to date you may find that SSL verification fails and you don't get a response. The correction solution for this [is not to disable SSL verification](http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/). The solution is to update your certificates. If you can't do that, there's an option at the top of the class file. Please don't just switch it off without at least attempting to update your certs -- that's lazy and dangerous. You're not a lazy, dangerous developer are you?

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 80.6% 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 ~867 days

Total

3

Last Release

691d ago

Major Versions

0.0.1-alpha → 1.0.02019-10-08

PHP version history (2 changes)0.0.1-alphaPHP &gt;=7.0

1.1.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/96db85b7eb9ffa4a58bc5e2c673818ca7823524d40e1dd383c071b5c2d9a3884?d=identicon)[WengerK](/maintainers/WengerK)

---

Top Contributors

[![WengerK](https://avatars.githubusercontent.com/u/1841592?v=4)](https://github.com/WengerK "WengerK (58 commits)")[![StevenAvelino24](https://avatars.githubusercontent.com/u/36336050?v=4)](https://github.com/StevenAvelino24 "StevenAvelino24 (13 commits)")[![htran-ubed](https://avatars.githubusercontent.com/u/95884589?v=4)](https://github.com/htran-ubed "htran-ubed (1 commits)")

---

Tags

phptrustedshopstrustedshops-apitrustedshops-sdktrustedshops-wrapperwrapper

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/antistatique-trustedshops-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/antistatique-trustedshops-php-sdk/health.svg)](https://phpackages.com/packages/antistatique-trustedshops-php-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)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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