PHPackages                             fostercommerce/shipstationconnect - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fostercommerce/shipstationconnect

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

fostercommerce/shipstationconnect
=================================

A Craft CMS plugin for integrating Craft Commerce with ShipStation

3.0.6(4mo ago)79.3k10[1 issues](https://github.com/FosterCommerce/shipstation-connect/issues)proprietaryPHPPHP ^8.2CI passing

Since Sep 21Pushed 4mo ago6 watchersCompare

[ Source](https://github.com/FosterCommerce/shipstation-connect)[ Packagist](https://packagist.org/packages/fostercommerce/shipstationconnect)[ Docs](https://github.com/fostercommerce/shipstation-connect)[ RSS](/packages/fostercommerce-shipstationconnect/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (10)Dependencies (8)Versions (45)Used By (0)

[![Header](resources/img/header.png)](resources/img/header.png)

ShipStation Connect for Craft Commerce
======================================

[](#shipstation-connect-for-craft-commerce)

A plugin for Craft Commerce that integrates with a ShipStation Custom Store.

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

[](#requirements)

This plugin requires Craft CMS 5 and Commerce 5 or later

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

[](#installation)

Install ShipStation Connect from the Plugin Store or with Composer

### From the Plugin Store

[](#from-the-plugin-store)

Go to the Plugin Store in your project’s Control Panel and search for “ShipStation Connect.” Click on the “Install” button in its modal window.

### With Composer

[](#with-composer)

Open your terminal (command line) and run the following commands:

```
# go to the project directory
cd /path/to/my-project

# tell Composer to load the plugin
composer require fostercommerce/shipstationconnect

# tell Craft to install the plugin
./craft install/plugin shipstationconnect
```

After installing, go to the Craft control panel plugin settings page to configure the settings for the plugin.

Custom Store Configuration
--------------------------

[](#custom-store-configuration)

Configure your connection in ShipStation following these instructions: [ShipStation "Custom Store" integration](https://help.shipstation.com/hc/en-us/articles/360025856192-Custom-Store-Development-Guide#UUID-685007d9-4cda-06f2-d2f6-011ab46805af_UUID-001f552d-4260-aeb0-8a23-0f6ff166e045).

### Connect Your Craft Store to ShipStation

[](#connect-your-craft-store-to-shipstation)

The "URL to Custom XML Page" is shown in the ShipStation Connect settings view in Craft.

### Username/Password

[](#usernamepassword)

ShipStation allows you to set a custom username and password combination for a connected store. This combination should match the values stored in the ShipStation Connnect settings view in your Craft control panel.

**Note:** These are *not* your ShipStation credentials, nor your Craft user credentials.

As of version 1.2.4, these values can be set with environment variables. [![Username/Password variables](screenshots/username-password-env-values.png)](screenshots/username-password-env-values.png)

#### Debugging Apache Authentication Errors

[](#debugging-apache-authentication-errors)

> The remote server returned an error

If you are seeing a 400 error (401 or 404 notably) and you're running on Apache. Try adding the following to your apache config.

```
CGIPassAuth On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

```

### Order Statuses

[](#order-statuses)

Ensure your shipping statuses in Craft Commerce and ShipStation match. You edit each platform to use custom statuses and ShipStation can match multiple Craft statuses to a single ShipStation status, when needed.

Commerce Integration
--------------------

[](#commerce-integration)

### Matrix Field

[](#matrix-field)

ShipStation Connect requires a Matrix Field for storing shipping information.

The matrix field should have a entry type with text fields for the following:

- Carrier
- Service
- Tracking Number

[![Matrix Field configuration](screenshots/matrix-field.png)](screenshots/matrix-field.png)

In the ShipStation Connnect settings, select the matrix field, and enter the handles for the entry type and text fields.

[![Shipping Info Matrix Field](screenshots/shipping-info-matrix-field.png)](screenshots/shipping-info-matrix-field.png)

When a shipping notification is received for an order from ShipStation, the plugin will add the shipping information to the Shipping Information field on the order and set the order to the Craft status paired with your ShipStation stores Shipped status.

Adding phone numbers to addresses sent to Shipstation
-----------------------------------------------------

[](#adding-phone-numbers-to-addresses-sent-to-shipstation)

Addresses are now part of Craft rather than Commerce, and the Phone number field was dropped from the address model. It is now necessary to add a custom field to the Address fields to store phone numbers.

The plugin setting gives you the option to set the field handle that you are using for phone numbers. The contents of this field will then be sent to Shipstation within the address portions of the order data.

Custom Fields
-------------

[](#custom-fields)

You can customize the data that is sent to ShipStation by listening to the `OrderEvent` event in a custom module or plugin, and set the values that you want per field, similar to the following example:

```
use craft\base\Event;
use fostercommerce\shipstationconnect\models\Order;
use fostercommerce\shipstationconnect\events\OrderEvent;
use fostercommerce\shipstationconnect\services\Xml;

Event::on(
	Xml::class,
	Xml::ORDER_EVENT,
	static function (OrderEvent $e) {
	  // The transformed order - This is the data that will be sent to ShipStation.
		$order = $e->order;

		// The source Commerce Order that was used to create the transformed order.
		$commerceOrder = $order->getParent();

		// Use full order number for OrderNumber
		$order->setOrderNumber($commerceOrder->number);

		// Set a custom field value
		$order->setCustomField1(Currency::formatAsCurrency($commerceOrder->getAdjustmentsTotal(), 'USD'));

		// Set internal notes
		$order->setInternalNotes('Custom Field 1: Adjustments Total');
	}
);
```

`OrderEvent` properties:

- `order` - The order that has been transformed into a format ready to be exported to ShipStation.

If you've changed the `OrderFieldEvent::FIELD_ORDER_NUMBER` field to be anything other than the order's reference number, you'll need to listen to the `OrdersController::FIND_ORDER_EVENT` to use your own query to fetch the order. In the example above, we're changing it to be the order's ID, so we would need to fetch the order by ID:

```
use craft\base\Event;
use craft\commerce\elements\Order as CommerceOrder;
use fostercommerce\shipstationconnect\controllers\OrdersController;
use fostercommerce\shipstationconnect\events\FindOrderEvent;

Event::on(
    OrdersController::class,
    OrdersController::FIND_ORDER_EVENT,
    function (FindOrderEvent $e) {
        // Set the order so that ShipStation Connect can update it's shipping details.
        $this->order = CommerceOrder::find()->number($e->orderNumber)->one();
    }
);
```

`FindOrderEvent` properties:

- `orderNumber` - The order number sent by ShipStation.
- `order` - The order that will be updated with shipping information.

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance73

Regular maintenance activity

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 58.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 ~62 days

Total

44

Last Release

131d ago

Major Versions

1.3.7 → 2.0.12022-08-05

1.4.0 → 2.0.42024-03-22

v1.x-dev → 2.1.02024-05-24

2.1.0 → 3.0.0-beta.12024-11-18

2.1.1 → 3.0.42025-07-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ac5b96165dd51aed8f0b9ea079d5d5beeb430a915cd07d645db0a228b0ac3aa?d=identicon)[fostercommerce](/maintainers/fostercommerce)

---

Top Contributors

[![johnnynotsolucky](https://avatars.githubusercontent.com/u/4161106?v=4)](https://github.com/johnnynotsolucky "johnnynotsolucky (93 commits)")[![peteeveleigh](https://avatars.githubusercontent.com/u/827065?v=4)](https://github.com/peteeveleigh "peteeveleigh (31 commits)")[![sjcallender](https://avatars.githubusercontent.com/u/984311?v=4)](https://github.com/sjcallender "sjcallender (19 commits)")[![nedu64](https://avatars.githubusercontent.com/u/173365706?v=4)](https://github.com/nedu64 "nedu64 (4 commits)")[![benface](https://avatars.githubusercontent.com/u/1059139?v=4)](https://github.com/benface "benface (4 commits)")[![Bakusedu](https://avatars.githubusercontent.com/u/34550806?v=4)](https://github.com/Bakusedu "Bakusedu (3 commits)")[![michaelramuta](https://avatars.githubusercontent.com/u/10780725?v=4)](https://github.com/michaelramuta "michaelramuta (2 commits)")[![cimocimocimo](https://avatars.githubusercontent.com/u/6751506?v=4)](https://github.com/cimocimocimo "cimocimocimo (2 commits)")

---

Tags

craft-commercecraft-commerce-plugincraft-plugincraftcmsshipstationpluginCraftshipstation

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fostercommerce-shipstationconnect/health.svg)

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

###  Alternatives

[verbb/events

A full-featured plugin for event management and ticketing.

2311.7k](/packages/verbb-events)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[verbb/vizy

A flexible visual editor field for Craft.

4348.6k](/packages/verbb-vizy)[verbb/icon-picker

A slick field to pick icons from. Supports SVGs, Sprites, Webfonts, Font Awesome and more.

16162.4k4](/packages/verbb-icon-picker)[weareferal/matrix-field-preview

Add screenshot previews to matrix and neo fields, helping you publish content quicker.

1717.5k](/packages/weareferal-matrix-field-preview)

PHPackages © 2026

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