PHPackages                             maksekeskus/php-shipping-sdk - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. maksekeskus/php-shipping-sdk

ActiveLibrary[HTTP &amp; Networking](/categories/http)

maksekeskus/php-shipping-sdk
============================

MakeCommerce PHP shipping SDK

1.5.6(3w ago)18↑275%[6 PRs](https://github.com/maksekeskus/php-shipping-sdk/pulls)MITPHPPHP &gt;=7.4CI passing

Since Mar 22Pushed 3w agoCompare

[ Source](https://github.com/maksekeskus/php-shipping-sdk)[ Packagist](https://packagist.org/packages/maksekeskus/php-shipping-sdk)[ Docs](https://makecommerce.net)[ RSS](/packages/maksekeskus-php-shipping-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (5)Versions (49)Used By (0)

MakeCommerce PHP Shipping SDK
=============================

[](#makecommerce-php-shipping-sdk)

**Package:** `maksekeskus/php-shipping-sdk` | **Version:** 1.5.6 | **PHP:** &gt;= 7.4 | **License:** MIT

A PHP client library for integrating with MakeCommerce shipping services. Supports shipment creation, rate calculation, pickup point lookups, label retrieval, carrier credential validation, and the embedded shipping manager UI.

> **Before you can create shipments, fetch rates, print labels, you must complete the one-time shop setup described in [Required First-Time Setup](#required-first-time-setup) below.** Skipping it will cause API errors — the platform has no sender address or carrier configuration to work with yet.

---

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Credentials](#credentials)
3. [Client Initialization](#client-initialization)
4. [Required First-Time Setup](#required-first-time-setup)
5. [Method Reference](#method-reference)
6. [Response Object](#response-object-mcresponse)
7. [Error Handling](#error-handling)
8. [Complete Example](#complete-example)
9. [Development](#development)

---

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

[](#installation)

```
composer require maksekeskus/php-shipping-sdk
```

Requires the `ext-json` PHP extension (enabled by default in most environments).

---

Credentials
-----------

[](#credentials)

Obtain your `shopId` and `secretKey` from the merchant portal:

EnvironmentPortal URLTESTLIVE> **Important:** Credentials are environment-specific. TEST credentials will not work against the LIVE API and vice versa.

### Public Test Credentials

[](#public-test-credentials)

Use these shared credentials against `Environment::TEST` to try the SDK without registering:

KeyValue`shopId``3425d8b7-0225-4367-8c6f-16b1aba8d766``secretKey``J5S4lcVjC1QfJec8IQPhHSKeAiEf10bPV7KrHPx9AmIl9nCoEtNtJo63SF0YKpFQ`Publishable key`79p15UvwBLlZfqmoMY8D8LAjq4CwI8Tn`> These are intentionally public. Replace them with your own credentials before going to production.

---

Client Initialization
---------------------

[](#client-initialization)

```
