PHPackages                             aglipanci/postmates-api - 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. aglipanci/postmates-api

ActiveLibrary[API Development](/categories/api)

aglipanci/postmates-api
=======================

Postmates API Client for PHP

v1.0.8(9y ago)1621.1k↓38.9%2MITPHPPHP ^5.6 || ~7.0CI failing

Since Mar 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/aglipanci/postmates-api)[ Packagist](https://packagist.org/packages/aglipanci/postmates-api)[ Docs](https://github.com/aglipanci/postmates-client)[ RSS](/packages/aglipanci-postmates-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (12)Used By (0)

PHP API Client for Postmates
============================

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

[![Build Status](https://camo.githubusercontent.com/ba6ac8cd4e6e22b4979eccb57abaab0c1e59c5cde46db1ec4b063f1e77ff5fdc/68747470733a2f2f7472617669732d63692e6f72672f61676c6970616e63692f706f73746d617465732d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aglipanci/postmates-api)

A PHP client for consuming the Postmates API.

Install
-------

[](#install)

Via Composer

```
$ composer require aglipanci/postmates-api
```

> Note that the minimum required version of PHP is 5.6

Usage
-----

[](#usage)

### Create client

[](#create-client)

```
$client = new Postmates\PostmatesClient([
    'customer_id' => 'some_customer_id',
    'api_key' => 'production_or_test_api_key'
]);
```

*Retrieve an API Key [here](https://postmates.com/developer/apikey) after creating a developer account.*

### Get a Delivery Quote

[](#get-a-delivery-quote)

```
$delivery_quote = new Postmates\Resources\DeliveryQuote($client);
$delivery_quote->getQuote('501-525 Brannan St, San Francisco, CA 94107', '6 Colin P Kelly Jr St, San Francisco, CA 94107');
```

[https://postmates.com/developer/docs/endpoints#get\_quote](https://postmates.com/developer/docs/endpoints#get_quote)

### Get Delivery Zones

[](#get-delivery-zones)

```
$delivery_zones = new Postmates\Resources\DeliveryZones($client);
$delivery_zones->listZones();
```

[https://postmates.com/developer/docs/endpoints#get\_zones](https://postmates.com/developer/docs/endpoints#get_zones)

### Create a Delivery

[](#create-a-delivery)

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

$params = [
    'manifest' => 'test manifest',
    'pickup_name' => 'test pickup nanme',
    'pickup_address' => '501-525 Brannan St, San Francisco, CA 94107',
    'pickup_phone_number' => '222 551 1234',
    'dropoff_name' => 'test dropoff name',
    'dropoff_address' => '6 Colin P Kelly Jr St, San Francisco, CA 94107',
    'dropoff_phone_number' => '222 555 5432',
];

$delivery->create($params);
```

[https://postmates.com/developer/docs/endpoints#create\_delivery](https://postmates.com/developer/docs/endpoints#create_delivery)

### List Deliveries

[](#list-deliveries)

```
$delivery = new Postmates\Resources\Delivery($client);
$delivery->listDeliveries();
```

[https://postmates.com/developer/docs/endpoints#list\_deliveries](https://postmates.com/developer/docs/endpoints#list_deliveries)

### Get a Delivery

[](#get-a-delivery)

```
$delivery = new Postmates\Resources\Delivery($client);
$delivery->get('del_LAPCo_EAxDv6z-');
```

[https://postmates.com/developer/docs/endpoints#get\_delivery](https://postmates.com/developer/docs/endpoints#get_delivery)

### Cancel a Delivery

[](#cancel-a-delivery)

```
$delivery = new Postmates\Resources\Delivery($client);
$delivery->cancel('del_LAPCo_EAxDv6a-');
```

[https://postmates.com/developer/docs/endpoints#cancel\_delivery](https://postmates.com/developer/docs/endpoints#cancel_delivery)

### Add Tip to a Delivery

[](#add-tip-to-a-delivery)

```
$delivery = new Postmates\Resources\Delivery($client);
$delivery->addTip('del_LAPCo_EAxDv6a-', 1000); // amount in cents
```

[https://postmates.com/developer/docs/endpoints#tip\_delivery](https://postmates.com/developer/docs/endpoints#tip_delivery)

### Handing WebHooks

[](#handing-webhooks)

```
$webhook = new Postmates\PostmatesWebhook('signature_secret_key');
$webhook_request = $webhook->parseRequest() // this will validate and return the webhook request

if($webhook_request['kind'] == Delivery::EVENT_DELIVERY_STATUS) {
    //this is a delivery status event
}

if($webhook_request['kind'] == Delivery::EVENT_COURIER_UPDATE) {
    //this is a courrier update event
}
```

if you want to just validate the request but handing it on your own:

```
$webhook = new Postmates\PostmatesWebhook('signature_secret_key');
$webhook_request_is_valid = $webhook->validateRequest($payload, $key)
```

### Errors

[](#errors)

All requests will throw an Postmates\\PostmatesException in case API returns an Error. An Example:

```
$params = [
    'manifest' => 'test manifest',
    'pickup_name' => 'test pickup nanme',
    'pickup_address' => '501-525 Brannan St, San Francisco, CA 94107',
    'pickup_phone_number' => '222 551 1234',
    'dropoff_name' => 'test dropoff name',
    'dropoff_address' => '6 Colin P Kelly Jr St, San Francisco, CA 94107',
    'dropoff_phone_number' => '222 555 5432',
];

try {

    $delivery->create($params);

} catch (Postmates\PostmatesException $e) {

    $e->getMessage();
    $e->getInvalidParams();

}
```

Testing
-------

[](#testing)

```
$ ./vendor/bin/phpunit
```

Credits
-------

[](#credits)

[Agli Panci](https://github.com/aglipanci)

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

[](#woocommerce-integration)

[WooCommerce Postmates Integration Plugin](https://wordpress.org/plugins/woo-postmates-integration/)

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~1 days

Total

11

Last Release

3360d ago

Major Versions

v0.9.1 → v1.02017-03-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ab3935dbfd17d02014b655a60004bf9f43a9367c3365d36c2308297eb01b158?d=identicon)[aglipanci](/maintainers/aglipanci)

---

Top Contributors

[![aglipanci](https://avatars.githubusercontent.com/u/2675283?v=4)](https://github.com/aglipanci "aglipanci (8 commits)")[![sash04ek](https://avatars.githubusercontent.com/u/10223169?v=4)](https://github.com/sash04ek "sash04ek (1 commits)")

---

Tags

api-clientpostmates-apiapi clientpostmates

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aglipanci-postmates-api/health.svg)

```
[![Health](https://phpackages.com/badges/aglipanci-postmates-api/health.svg)](https://phpackages.com/packages/aglipanci-postmates-api)
```

###  Alternatives

[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[jobapis/jobs-common

Making it simple to integrate your application with job api providers.

4459.3k32](/packages/jobapis-jobs-common)[fabian-beiner/todoist-php-api-library

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

4810.8k](/packages/fabian-beiner-todoist-php-api-library)[mrt1m/playstation-store-api

A simple wrapper for working with PlayStation Store API

734.2k](/packages/mrt1m-playstation-store-api)[boci/hetzner-laravel

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

901.4k](/packages/boci-hetzner-laravel)[m1x0n/helpscout-docs-api-php

API client for the Help Scout Docs API

2124.2k1](/packages/m1x0n-helpscout-docs-api-php)

PHPackages © 2026

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