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

ActiveLibrary[API Development](/categories/api)

paps-app/paps-php-client
========================

Paps API Client for PHP

3.0.0(4y ago)21.6k[2 PRs](https://github.com/paps-app/paps-php-client/pulls)MITPHPPHP &gt;=7.2 &lt;8.2

Since Jan 9Pushed 3y agoCompare

[ Source](https://github.com/paps-app/paps-php-client)[ Packagist](https://packagist.org/packages/paps-app/paps-php-client)[ Docs](https://github.com/paps-app/paps-php-client)[ RSS](/packages/paps-app-paps-php-client/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (5)Versions (16)Used By (0)

PHP API Client for Paps
=======================

[](#php-api-client-for-paps)

A PHP client for consuming the [Paps API](https://developers.paps.sn/).

*This client is targeting the API version v2*.

Install
-------

[](#install)

Via Composer

```
$ composer require paps-app/paps-php-client
```

> The minimum required version of PHP is 5.6

Usage
-----

[](#usage)

All the method listed below are the same documented on the RESTful API, so this guide won't be covering any params required for each method. Please, yout can however refer to the Examples sections.

### Create the client

[](#create-the-client)

First you'll need to initialize the client by providing your API. To get an API, visit [the documentation](https://developers.paps.sn/) and click on "Get a Key" button.

```
$client = new Paps\PapsClient([
  'api_key' => ''
]);
```

### Enter Test Mode

[](#enter-test-mode)

Please consider entering test mode when starting to experiment with this API. Note that under test mode, you have full control over your tasks. You can create, cancel, change your task statues or even delete them. But remember to hack responsibly 😉.

```
$client = new Paps\PapsClient([
  'api_key' => '',
  'mode' => 'test'
]);
```

### Create a delivery request linked to your main account on [Monespace](https://monespace.paps.sn/)

[](#create-a-delivery-request-linked-to-your-main-account-on-monespace)

- Method : [`$delivery->createTaskForAPIUser($email = string, array $delivery_params = [], array $pickup_params = [])`](https://developers.paps.sn/create#cr%C3%A9ation-de-t%C3%A2ches-avec-suivi-sur-monespace)

You can use this method if you also want to track your orders on the Monespace web client application. Note that you must specify the email address of the account that has access to the application. Again, make sure to read the documentation for params expected by this method

- Example :

```
$delivery = new Paps\Resources\Delivery($client);

// Email registered on your Monespace account
$email = "kiamet@example.com"

// Prepare your pickups params
$pickups = [
    [
        "address" => "Almadies, Dakar, Senegal",
        "name" => "Saliou Samb",
        "time" => date('Y-m-d H:i:s', time()),
        "phone" => "+221700000000",
        "job_description" => "Test Saliou"
    ]
];

// Prepare your delivery params
$deliveries = [
    [
        "address" => "Medina, Dakar, Senegal",
        "name" => "Modou Diakahté",
        "time" => date('Y-m-d H:i:s', time()),
        "phone" => "+221700000000",
        "job_description" => "Test Saliou"
    ]
];

// Pass your request
$response = $delivery->createTaskForAPIUser($email, $pickups, $deliveries);

// Read your response, hopefully successful.
echo json_encode($response);
```

### Create a standard [Delivery Request with a pickup](https://developers.paps.sn/create)

[](#create-a-standard-delivery-request-with-a-pickup)

- Method : [`$delivery->create(array $delivery_params = []);`](https://developers.paps.sn/create#cr%C3%A9er-une-t%C3%A2che-de-pickup-et-delivery-li%C3%A9s)

Make sure to read the documentation before sending any requests.

- Example :

```
$delivery = new Paps\Resources\Delivery($client);

// Prepare your params
$delivery_params = [
  'jobDescription' => 'Commande venant du site de Test',
  'jobPickupPhone' => '778888888',
  'jobPickupName' => 'Test Pickup Name',
  'jobPickupAddress' => 'Medina, Dakar, Sénégal',
  'jobPickupDatetime' => '2019-01-12 12:00:00',
  'jobDeliveryDatetime' => '2019-01-14 12:00:00',
  'customerUsername' => 'Test Delivery Name',
  'customerAddress' => 'Urbam, Dakar, Sénégal',
  'customerPhone' => '779999999'
];

// Pass your request
$response = $delivery->create($delivery_params);

// Read your response, hopefully successful.
echo json_encode($response);
```

### Make a delivery [quote request](https://developers.paps.sn/get-quotes)

[](#make-a-delivery-quote-request)

- Method : [`$delivery->submitQuotesRequest(array $quotes_params = [])`](https://developers.paps.sn/get-quotes#requ%C3%AAte-pour-obtenir-un-tarif)

You can get delivery quotes directly from the API. Usually, the rates are already communicated to you through the contract that you have approved or signed to start using Paps.

- Example :

```
$delivery = new Paps\Resources\Delivery($client);

// Prepare your request params
$quotes_params = [
  "origin" => "Medina, Dakar, Senegal",
  "destination" => "Almadies, Dakar, Senegal",
  "packageSize" => "small"
];

// Pass your request
$response = $delivery->submitQuotesRequest($quotes_params);

// Read your response, hopefully successful.
echo json_encode($response);
```

### Read a delivery [task's information](https://developers.paps.sn/handle)

[](#read-a-delivery-tasks-information)

- Method : [`$delivery->get($task_id = string)`](https://developers.paps.sn/handle#visualiser-les-infos-sur-une-t%C3%A2che)

You can view a task that has been created using this method.

- Example :

```
$delivery = new Paps\Resources\Delivery($client);

// Prepare your request params
$task_id = "7233112";

// Pass your request
$response = $delivery->get($task_id);

// Read your response, hopefully successful.
echo json_encode($response);
```

### Get a [list of delivery](https://developers.paps.sn/handle#visualiser-les-t%C3%A2ches-cr%C3%A9%C3%A9es-avec-votre-cl%C3%A9-api)

[](#get-a-list-of-delivery)

- Method : [`$delivery->listDeliveries($date = string, $start_date = string, $end_date = string, $select_by = string)`](https://developers.paps.sn/handle#visualiser-les-t%C3%A2ches-cr%C3%A9%C3%A9es-avec-votre-cl%C3%A9-api)

You can view a task that has been created using this method.

- Example :

```
$delivery = new Paps\Resources\Delivery($client);

// Prepare your request params
$start_date = date('Y-m-d H:i:s'),
$end_date = date('Y-m-d H:i:s'),
$select_by = "intervalle"

// Pass your request
$response = $delivery->listDeliveries(null, $start_date, $end_date, $select_by);

// Read your response, hopefully successful.
echo json_encode($response);
```

### [Cancel a delivery](https://developers.paps.sn/handle#annuler-une-t%C3%A2che)

[](#cancel-a-delivery)

- Method : [`$delivery->cancel($task_id = string)`](https://developers.paps.sn/handle#annuler-une-t%C3%A2che)

You can cancel a task by providing it's ID. Remember you can't cancel a task that has the following status : IN\_PROGRESS and STARTED.

- Example :

```
$delivery = new Paps\Resources\Delivery($client);

// Prepare your request params
$task_id = "7233112";

// Pass your request
$response = $delivery->cancel($task_id);

// Read your response, hopefully successful.
echo json_encode($response);
```

WooCommerce Integration
-----------------------

[](#woocommerce-integration)

[WooCommerce Paps Integration Plugin](https://wordpress.org/plugins/woocommerce-paps/)

License
-------

[](#license)

The [MIT License](https://opensource.org/licenses/MIT) (MIT).

###  Health Score

36

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 66.7% 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 ~96 days

Recently: every ~191 days

Total

13

Last Release

1466d ago

Major Versions

0.2.0 → 2.0.x-dev2022-02-13

2.0.x-dev → 3.0.02022-03-16

PHP version history (4 changes)0.0.1PHP ^5.6 || ~7.0

0.2.0PHP ^7.3|^8.0

2.0.x-devPHP &gt;=5.4.0

3.0.0PHP &gt;=7.2 &lt;8.2

### Community

Maintainers

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

---

Top Contributors

[![madiodio](https://avatars.githubusercontent.com/u/15022248?v=4)](https://github.com/madiodio "madiodio (20 commits)")[![kiamet](https://avatars.githubusercontent.com/u/75784663?v=4)](https://github.com/kiamet "kiamet (10 commits)")

---

Tags

sdkapi clientpaps

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

631.4M3](/packages/crowdin-crowdin-api-client)[square/square

Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.

763.3M17](/packages/square-square)[fabian-beiner/todoist-php-api-library

A PHP client library that provides a native interface to the official Todoist REST API.

4810.6k](/packages/fabian-beiner-todoist-php-api-library)[pepipost/pepipost-sdk-php

Pepipost API is used to send the mail to the receipients specified in the docs

2133.1k](/packages/pepipost-pepipost-sdk-php)[boci/hetzner-laravel

A Laravel SDK for interacting with the Hetzner Cloud API - inspired by Nuno Maduro's OpenAI PHP client

881.2k](/packages/boci-hetzner-laravel)[messagemedia/messages-sdk

The MessageMedia Messages API provides a number of endpoints for building powerful two-way messaging applications.

12378.8k](/packages/messagemedia-messages-sdk)

PHPackages © 2026

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