PHPackages                             dropcart/php-client - 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. dropcart/php-client

ActiveLibrary[API Development](/categories/api)

dropcart/php-client
===================

Use this package to communicate with the Dropcart engine on a PHP server.

v3.0(2y ago)11.2kMITPHPPHP ^7.4 | ^8.0CI failing

Since Feb 8Pushed 2y ago3 watchersCompare

[ Source](https://github.com/dropcart/php-client)[ Packagist](https://packagist.org/packages/dropcart/php-client)[ RSS](/packages/dropcart-php-client/feed)WikiDiscussions master Synced 4d ago

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

Dropcart PHP Client
===================

[](#dropcart-php-client)

See also GitHub Pages:

Dropcart makes it extremely easy setting up an online shop. All orders, payments and invoices are created and processed automatically. There is no need for for pushing the order manually to a wholesaler, or to create a package slip, or whatever.

This Dropcart PHP Client is the official PHP client for the REST API provided by Dropcart for setting up your own web frontend.

- **English**
    - [Installation](#installation)
        - [Via composer](#via-composer-(preferred))
        - [Standalone](#standalone)
    - [Usage](#usage)
    - [Licence](#license)
    - [Support](#support)

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

[](#installation)

Installation is rather easy. This client is available as a package on [Packagist](https://packagist.org/) and thus addable to your project via composer. *This is the preferred method*.

The client is also available as standalone .zip.

### Via composer (preferred)

[](#via-composer-preferred)

```
$ composer require dropcart/dropcart-php-client
```

Add `require vendor/autoload.php` to the files where you want to use the client. (`../` is of course relative to where you require the file)

### Standalone

[](#standalone)

1. Download the latest version of the [build/DropcartPhpClient.zip](https://raw.githubusercontent.com/dropcart/dropcart-php-client/master/build/DropcartPhpClient.zip)
2. Extract and upload via (S)FTP to your shared hosting just outside of de document root.
3. Add `require ../vendor/autoload.php` to the files where you want to use the client. (`../` is of course relative to where you require the file)

Usage
-----

[](#usage)

You'll need your public and private key. Login on the [Dropcart Management Console](https://my.dropcart.nl/login) or [register](https://dropcart.nl) to obtain those keys.

##### **First set your keys**

[](#first-set-your-keys)

```
\Dropcart\PhpClient\DropcartClient::setPublicKey('PUBLIC_KEY');
\Dropcart\PhpClient\DropcartClient::setPrivateKey('PRIVATE_KEY');
```

##### **Making a request**

[](#making-a-request)

You can make request to the different services by calling it as method:

```
\Dropcart\PhpClient\DropcartClient::catalog();
\Dropcart\PhpClient\DropcartClient::catalog()->products();
\Dropcart\PhpClient\DropcartClient::catalog()->brands();
\Dropcart\PhpClient\DropcartClient::catalog()->categories();
```

The latest method is always one of these:

```
->get(...$args)
->post(...$args)
->put(...$args)
->delete(...$args);
```

By doing so the code will generate the appropiate URL with the requested HTTP method. For example

```
\Dropcart\PhpClient\DropcartClient::catalog()->products()->get(12332);
// Will make a GET request to:
// https://rest-api.dropcart.nl/catalog/products/12332

\Dropcart\PhpClient\DropcartClient::catalog(34)->products()->get();
// Will make a GET request to:
// https://rest-api.dropcart.nl/catalog/34/products (this will actually fail because this isn't a valid endpoint)
```

If you need to send parameters along with a post or put request you'll use `addParam($name, $value)` or `addParams($array)`

```
\Dropcart\PhpClient\DropcartClient::catalog()->products()->addParams([
	'name' => 'New Product',
	'description' => 'A descriptive text about this new and awesome product. You need to buy this, yo!'
])->post();
```

##### **Getting the response**

[](#getting-the-response)

This client uses the amazing [Guzzle](http://docs.guzzlephp.org/en/stable/) for making request. The response are Psr7 Responses. You'll get the wanted JSON by doing:

```
try {
	$response   = \Dropcart\PhpClient\DropcartClient::catalog(34)->products()->get();
} catch(DropcartClientException $e) {
	die('Client error:' . $e->getMessage());
} catch (\Exception $e)
{
	die('Server error:' . $e->getMessage());
}

$json       = $respons->getBody();
```

For a global overview of all the REST functions check [REST.md](REST.md)

License
-------

[](#license)

See the [LICENSE](LICENSE) file for license rights and limitations (MIT).

Support
-------

[](#support)

Please file an GitHub Issue when there are errors in the code.

When failing to install please contact us:

Nederlands
----------

[](#nederlands)

Met Dropcart is het opzetten van een webshop bijzonder eenvoudig. Alle bestellingen, betalingen en facturen worden automatisch aangemaakt en verwerkt. Het is dus niet meer nodig om handmatig een bestelling bij een groothandel in te voeren, pakbon te verzenden etcetera.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 63.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 ~422 days

Recently: every ~526 days

Total

6

Last Release

907d ago

Major Versions

v1.1 → v2.02021-08-10

v2.0 → v3.02023-11-21

PHP version history (3 changes)v1.0.3PHP ^7.0

v2.0PHP ^7.1

v3.0PHP ^7.4 | ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5790977?v=4)[TomKriek](/maintainers/TomKriek)[@TomKriek](https://github.com/TomKriek)

![](https://www.gravatar.com/avatar/db540d575585abec4d53bd1c22f5776328532b308a9dbc6072acc0d0ad221f93?d=identicon)[erikstelt](/maintainers/erikstelt)

---

Top Contributors

[![deargonaut](https://avatars.githubusercontent.com/u/5047107?v=4)](https://github.com/deargonaut "deargonaut (28 commits)")[![erikstelt](https://avatars.githubusercontent.com/u/15685574?v=4)](https://github.com/erikstelt "erikstelt (8 commits)")[![sandcore-dev](https://avatars.githubusercontent.com/u/32176563?v=4)](https://github.com/sandcore-dev "sandcore-dev (8 commits)")

---

Tags

clientdropcartphpsoftwarewebshop

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/dropcart-php-client/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[fschmtt/keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.

4684.7k2](/packages/fschmtt-keycloak-rest-api-client-php)[mvdnbrk/dhlparcel-php-api

DHL Parcel API client for PHP

3957.9k5](/packages/mvdnbrk-dhlparcel-php-api)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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