PHPackages                             victorycodedev/shipday - 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. victorycodedev/shipday

ActiveLibrary[API Development](/categories/api)

victorycodedev/shipday
======================

A modern PHP SDK for the Shipday API.

2.0.0(1mo ago)2282MITPHPPHP ^8.3

Since Apr 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/victorycodedev/shipday)[ Packagist](https://packagist.org/packages/victorycodedev/shipday)[ Docs](https://github.com/victorycodedev/shipday)[ RSS](/packages/victorycodedev-shipday/feed)WikiDiscussions main Synced 1w ago

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

Shipday PHP SDK
===============

[](#shipday-php-sdk)

A modern PHP SDK for the [Shipday API](https://docs.shipday.com/reference).

The SDK requires PHP 8.3+ and uses a resource-based API:

```
use Victorycodedev\Shipday\Shipday;
use Victorycodedev\Shipday\Enums\OrderStatus;

$shipday = Shipday::make('your-shipday-api-key');

$order = $shipday->orders()->create([
    'orderNumber' => 'A-1001',
    'customerName' => 'Ada Lovelace',
    'customerAddress' => '556 Crestlake Dr, San Francisco, CA 94132, USA',
    'customerPhoneNumber' => '+14152392212',
    'restaurantName' => 'Popeyes Louisiana Kitchen',
    'restaurantAddress' => '890 Geneva Ave, San Francisco, CA 94112, United States',
]);
```

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

[](#installation)

```
composer require victorycodedev/shipday
```

Requirements
------------

[](#requirements)

- PHP 8.3+
- Shipday API key

Some generated Shipday examples also show an `x-api-key` header. The SDK does not send a literal `x-api-key: null` header, but you can include an `x-api-key` value when needed:

```
$shipday = Shipday::make(
    apiKey: 'your-shipday-api-key',
    xApiKey: 'your-x-api-key',
);
```

Delivery Orders
---------------

[](#delivery-orders)

```
$shipday = Shipday::make('your-shipday-api-key');

$shipday->orders()->active();
$shipday->orders()->find('ORDER_NUMBER');
$shipday->orders()->create([...]);
$shipday->orders()->update($orderId, [...]);
$shipday->orders()->delete($orderId);
$shipday->orders()->query([...]);
$shipday->orders()->assignDriver($orderId, $carrierId);
$shipday->orders()->unassignDriver($orderId);
$shipday->orders()->readyToPickup($orderId); // sends ["readyToPickup" => true]
$shipday->orders()->updateStatus($orderId, OrderStatus::Started);
// Raw strings are also accepted for forward compatibility:
$shipday->orders()->updateStatus($orderId, 'STARTED');
```

Pickup Orders
-------------

[](#pickup-orders)

```
$shipday->pickupOrders()->create([...]);
$shipday->pickupOrders()->find($orderId);
$shipday->pickupOrders()->update($orderId, [...]);
$shipday->pickupOrders()->delete($orderId);
```

Carriers
--------

[](#carriers)

```
$shipday->carriers()->all();

$shipday->carriers()->create([
    'name' => 'Jane Driver',
    'email' => 'jane@example.com',
    'phoneNumber' => '+11234567890',
]);

$shipday->carriers()->delete($carrierId);
```

Delivery Tracking
-----------------

[](#delivery-tracking)

```
$shipday->tracking()->progress(
    trackingId: 'tracking-id',
    includeStaticData: true,
);
```

On-Demand Delivery
------------------

[](#on-demand-delivery)

```
$shipday->onDemand()->services();
$shipday->onDemand()->estimate($orderId);

$shipday->onDemand()->assign([
    'name' => 'DoorDash',
    'orderId' => $orderId,
    'tip' => 6.50,
    'estimateReference' => 'estimate-reference',
    'contactlessDelivery' => false,
    'podType' => 'PHOTO',
]);

$shipday->onDemand()->details($orderId);
$shipday->onDemand()->cancel($orderId);

$shipday->onDemand()->availability([
    'pickupAddress' => '1 Wall St, New York, NY 10005, USA',
    'deliveryAddress' => '1000 5th Ave, New York, NY 10028, USA',
]);
```

Partner API
-----------

[](#partner-api)

Partner endpoints use a separate client because Shipday requires `PARTNER-API-KEY`.

```
use Victorycodedev\Shipday\PartnerShipday;
use Victorycodedev\Shipday\Enums\PartnerOrderStatus;

$partner = PartnerShipday::make('your-partner-api-key');

$partner->orders()->query([
    'companyId' => '1234',
    'orderStatus' => PartnerOrderStatus::Active,
    'startCursor' => 1,
    'endCursor' => 25,
]);
$partner->orders()->completed($companyId);
$partner->members()->details();
```

Exceptions
----------

[](#exceptions)

The SDK uses one exception class:

```
use Victorycodedev\Shipday\Exceptions\ShipdayException;

try {
    $shipday->orders()->active();
} catch (ShipdayException $exception) {
    $exception->statusCode();
    $exception->response();
    $exception->headers();
    $exception->errorId();
    $exception->errorName();
    $exception->details();
    $exception->retryAfter();
}
```

Enums
-----

[](#enums)

The SDK includes enums for documented Shipday values while still accepting raw strings where forward compatibility matters.

### Order Status

[](#order-status)

Use `OrderStatus` when updating a delivery order status:

```
use Victorycodedev\Shipday\Enums\OrderStatus;

$shipday->orders()->updateStatus($orderId, OrderStatus::Started);
```

Available cases:

```
OrderStatus::Started;
OrderStatus::PickedUp;
OrderStatus::ReadyToDeliver;
OrderStatus::AlreadyDelivered;
OrderStatus::Incomplete;
OrderStatus::FailedDelivery;
```

### Partner Order Status

[](#partner-order-status)

Use `PartnerOrderStatus` when querying partner orders:

```
use Victorycodedev\Shipday\Enums\PartnerOrderStatus;

$partner->orders()->query([
    'companyId' => '1234',
    'orderStatus' => PartnerOrderStatus::Active,
]);
```

Available cases:

```
PartnerOrderStatus::Active;
PartnerOrderStatus::NotAssigned;
PartnerOrderStatus::NotAccepted;
PartnerOrderStatus::NotStartedYet;
PartnerOrderStatus::Started;
PartnerOrderStatus::PickedUp;
PartnerOrderStatus::ReadyToDeliver;
PartnerOrderStatus::AlreadyDelivered;
PartnerOrderStatus::FailedDelivery;
PartnerOrderStatus::Incomplete;
```

### Webhook Events

[](#webhook-events)

Webhook events expose both raw strings and enum helpers:

```
$event->event();
$event->eventType();
```

Known event enum cases include:

```
WebhookEventType::OrderAssigned;
WebhookEventType::OrderAcceptedAndStarted;
WebhookEventType::OrderOnTheWay;
WebhookEventType::OrderCompleted;
WebhookEventType::OrderFailed;
WebhookEventType::OrderIncomplete;
WebhookEventType::OrderDeleted;
WebhookEventType::OrderInserted;
WebhookEventType::OrderPickedUp;
WebhookEventType::OrderUnassigned;
WebhookEventType::OrderPickedUpRemoved;
WebhookEventType::OrderOnTheWayRemoved;
WebhookEventType::OrderPodUpload;
WebhookEventType::LocationUpdate;
```

Webhook order statuses expose:

```
$event->status();
$event->statusType();
```

Known status enum cases include:

```
WebhookOrderStatus::NotAssigned;
WebhookOrderStatus::NotAccepted;
WebhookOrderStatus::NotStartedYet;
WebhookOrderStatus::Started;
WebhookOrderStatus::PickedUp;
WebhookOrderStatus::ReadyToDeliver;
WebhookOrderStatus::AlreadyDelivered;
WebhookOrderStatus::Incomplete;
WebhookOrderStatus::FailedDelivery;
```

Webhooks
--------

[](#webhooks)

Your application still receives the HTTP webhook request. The SDK helps validate the optional Shipday webhook token, decode the payload, detect the event type, and expose useful values.

Shipday sends the validation token in a header named `token`.

### Laravel Example

[](#laravel-example)

```
use Illuminate\Http\Request;
use Victorycodedev\Shipday\Enums\WebhookEventType;
use Victorycodedev\Shipday\Enums\WebhookOrderStatus;
use Victorycodedev\Shipday\Webhooks\DriverLocationUpdated;
use Victorycodedev\Shipday\Webhooks\OrderStatusUpdated;
use Victorycodedev\Shipday\Webhooks\ShipdayWebhook;

Route::post('/webhooks/shipday', function (Request $request) {
    $event = ShipdayWebhook::fromRequest(
        payload: $request->getContent(),
        headers: $request->headers->all(),
        token: config('services.shipday.webhook_token'),
    );

    if ($event instanceof OrderStatusUpdated) {
        $event->event();
        $event->eventType(); // WebhookEventType::OrderCompleted
        $event->status();
        $event->statusType(); // WebhookOrderStatus::AlreadyDelivered
        $event->orderId();
        $event->orderNumber();
        $event->order();
        $event->carrier();
    }

    if ($event instanceof DriverLocationUpdated) {
        $event->orderId();
        $event->companyId();
        $event->latitude();
        $event->longitude();
        $event->timestamp();
    }

    return response()->json(['received' => true]);
});
```

### Plain PHP Example

[](#plain-php-example)

```
use Victorycodedev\Shipday\Webhooks\ShipdayWebhook;

$event = ShipdayWebhook::fromGlobals(
    token: $_ENV['SHIPDAY_WEBHOOK_TOKEN'] ?? null,
);

http_response_code(200);
```

The beta driver location webhook is supported through `DriverLocationUpdated`.

Testing
-------

[](#testing)

This package uses [Pest](https://pestphp.com/).

```
composer test
```

Upgrade Notes From v1
---------------------

[](#upgrade-notes-from-v1)

The old `Delivery` and `OnDemandDelivery` classes are deprecated compatibility wrappers. New applications should use:

```
$shipday = Shipday::make('your-shipday-api-key');
```

Method names changed to a resource style. For example:

```
// v1
$delivery->insertOrder($payload);

// resource API
$shipday->orders()->create($payload);
```

License
-------

[](#license)

[MIT](LICENSE.md)

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance89

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~385 days

Total

4

Last Release

54d ago

Major Versions

1.1.0 → 2.0.02026-06-13

PHP version history (2 changes)1.0.0PHP ^8.1|^8.2

2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a9121c2abdf0dfbe4cad781dbfd14ac38b274fb12b1e247825c2c36f54739c2?d=identicon)[victorycodedev](/maintainers/victorycodedev)

---

Top Contributors

[![victorycodedev](https://avatars.githubusercontent.com/u/45511695?v=4)](https://github.com/victorycodedev "victorycodedev (16 commits)")

---

Tags

webhooksdeliveryshipdayshipday-php-sdkshipday-api

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/victorycodedev-shipday/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.9k3.8M1.1k](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k51](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.7M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2482.9k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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