Download the PHP package tigusigalpa/shippo-php without Composer

On this page you can find all versions of the php package tigusigalpa/shippo-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package shippo-php

Shippo PHP SDK — Modern Shipping Integration for PHP and Laravel

Shippo PHP SDK

Latest Version on Packagist Tests License

If you're building an e-commerce platform, a warehouse management system, or any PHP application that needs to ship physical products, you know how painful it can be to integrate with carrier APIs directly. Each carrier has its own format, its own quirks, and its own set of headaches.

Shippo PHP SDK takes that pain away. It gives you a single, clean interface to work with dozens of shipping carriers through the Shippo API — and it does it in a way that feels natural to PHP and Laravel developers.

This package lets you compare shipping rates across carriers, generate and print shipping labels, validate addresses before they cause delivery failures, track packages in real time, handle customs for international shipments, and much more — all from your PHP code.

📖 Full documentation available on Wiki

Why Use This SDK?

There are a few ways to talk to the Shippo API from PHP. You could use raw HTTP requests, or you could reach for the official client. But this SDK was built with a different philosophy in mind: it should feel like a first-class PHP package, not a thin wrapper around REST calls.

Here's what sets it apart:

Requirements

Installation

Getting started takes just one command:

That's it. Composer will pull in the package and its dependencies.

Setting Up with Laravel

If you're using Laravel, the package registers itself automatically thanks to Laravel's package auto-discovery — no need to touch config/app.php.

To customize the configuration, publish the config file:

Then add your Shippo API credentials to your .env file:

Set SHIPPO_IS_TEST to true while you're developing. Switch it to false when you're ready to go live with real shipments.

Quick Start

Using the SDK Standalone (Without Laravel)

You can use this SDK in any PHP project — it doesn't require Laravel at all. Here's how to set it up with Guzzle as the HTTP client:

Notice how the response is a real typed object, not a raw array. You get $address->objectId, $address->city, and so on — with full IDE autocompletion.

Using the SDK with Laravel

In Laravel, things are even simpler. Just use the Facade:

No manual configuration, no service container bindings to set up — it just works.

Real-World Usage Examples

Below are practical examples covering the most common shipping scenarios you'll encounter in production.

Validating an Address Before Shipping

Bad addresses are one of the top reasons packages get returned or delayed. Validating addresses upfront saves money and keeps your customers happy:

This is especially useful in checkout flows — validate the address before the customer places the order, and you'll avoid a lot of headaches down the line.

Creating a Shipping Label (Step by Step)

This is probably the most common workflow: create a shipment, pick a rate, and buy the label.

The labelUrl gives you a direct link to a printable PDF. The trackingNumber is what you share with your customer so they can follow their package.

Tracking a Package

Give your customers real-time visibility into where their order is:

You can use this to build a tracking page on your site, send status update emails, or feed data into your order management system.

Handling International Shipments with Customs Declarations

Shipping internationally? You'll need customs information. The SDK makes this straightforward:

Without proper customs declarations, international packages can get stuck at the border or returned to sender. This SDK handles the entire flow so you don't have to piece it together manually.

Listing Addresses with Pagination

If you're managing a lot of addresses (for example, a customer address book), pagination keeps things efficient:

The PaginatedCollection is iterable and countable, so you can use it in foreach loops, pass it to Blade views, or serialize it to JSON for an API response.

Refunding a Shipping Label

Made a mistake? Need to cancel a shipment? You can request a refund for unused labels:

Refund policies vary by carrier, but Shippo handles the communication — you just need to provide the transaction ID.

Batch Label Creation for High-Volume Shipping

If you're shipping dozens or hundreds of packages at once, creating labels one by one is too slow. Batch operations let you handle bulk shipments efficiently:

This is ideal for fulfillment centers, subscription box services, or any business that processes a large number of orders daily.

Error Handling

Things don't always go smoothly — invalid addresses, expired tokens, rate limits, server outages. The SDK gives you a clear exception hierarchy so you can handle each situation appropriately:

The RateLimitException is worth noting: the SDK automatically retries rate-limited requests with exponential backoff. It only throws this exception if all retry attempts are exhausted, so in most cases you won't even see it.

Configuration

Standalone Configuration

When using the SDK outside of Laravel, you can fine-tune the behavior through the Config object:

Laravel Configuration

After publishing the config, you'll find config/shippo.php in your project. All values can be overridden via environment variables:

This follows the standard Laravel convention of keeping secrets and environment-specific settings in .env rather than hardcoding them.

Testing

The SDK includes a comprehensive test suite powered by Pest PHP. Running the tests is straightforward:

To generate a code coverage report:

For static analysis with PHPStan (configured at the strictest level 8):

If you're contributing to this package, please make sure all tests pass and PHPStan reports no errors before submitting a pull request.

Complete API Resource Reference

The SDK covers every major endpoint in the Shippo API. Here's what you can do with each resource:

Architecture and Design Decisions

This SDK was designed with a few guiding principles that might be useful to understand if you're evaluating it for your project:

Frequently Asked Questions

Can I use this SDK without Laravel? Yes. The core SDK is framework-agnostic. Laravel support is an optional add-on that activates automatically when it detects a Laravel environment. You can use this package with any PHP 8.1+ project — Symfony, Slim, custom frameworks, or plain PHP scripts.

Which carriers does Shippo support? Shippo supports 40+ carriers worldwide including USPS, UPS, FedEx, DHL Express, Canada Post, Australia Post, Royal Mail, and many more. The full list is available in the Shippo documentation.

Is the sandbox/test mode really free? Yes. When you set is_test to true, all API calls go to Shippo's sandbox. No real labels are created, no charges are incurred. It's the recommended way to develop and test your integration.

How does the retry logic work? When the SDK receives a 429 (Too Many Requests) response from Shippo, it waits and retries automatically. The wait time doubles with each attempt (exponential backoff). You can configure the number of retry attempts and the initial delay. If all retries fail, a RateLimitException is thrown.

Can I use Symfony HttpClient instead of Guzzle? Absolutely. Any PSR-18 compatible HTTP client will work. Just pass your client instance to the Shippo constructor. If you're using Symfony, the symfony/http-client with nyholm/psr7 is a great combination.

Contributing

Contributions, bug reports, and feature requests are welcome. Whether it's a typo in the docs, a bug fix, or a whole new feature — every contribution helps make this package better for everyone.

Please see CONTRIBUTING.md for detailed guidelines.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Security

If you discover a security vulnerability, please report it responsibly by emailing [email protected]. Please do not use the public issue tracker for security issues — it helps protect users while the fix is being prepared.

Credits

License

This package is open-sourced software licensed under the MIT License. You're free to use it in personal and commercial projects.

Useful Links

Changelog

All notable changes are documented in CHANGELOG.md. This project follows Semantic Versioning.


All versions of shippo-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tigusigalpa/shippo-php contains the following files

Loading the files please wait ...