Search by

koderia-creative-lab / laravel-sendbox

xenabyte

A modern Laravel client for the Sendbox shipping and logistics API.

Package info

github.com/Koderia-Creative-Lab/laravel-sendbox

pkg:composer/koderia-creative-lab/laravel-sendbox

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-30 08:17 UTC

This package is auto-updated.

Last update: 2026-11-30 08:23:18 UTC


README

A Laravel client for the Sendbox shipping and logistics API supporting delivery quotes, shipment creation, tracking, and shipment billing.

Installation

composer require koderia-creative-lab/laravel-sendbox

Publish configuration:

php artisan vendor:publish --tag="sendbox-config"

Configuration

Add the following environment variables to .env:

SENDBOX_API_TOKEN=your_api_token
SENDBOX_API_SECRET=your_api_secret
SENDBOX_URL=https://live.sendbox.co/v1
SENDBOX_TIMEOUT=30
SENDBOX_LOGGING=true

Usage

Get a Shipping Quote

use Koderia\Sendbox\Facades\Sendbox;

$response = Sendbox::getShippingQuote([
    'origin_city'         => 'Lagos',
    'origin_state'        => 'Lagos',
    'origin_country'      => 'NG',
    'destination_city'    => 'Abuja',
    'destination_state'   => 'FCT',
    'destination_country' => 'NG',
    'weight'              => 1.5,
    'currency'            => 'NGN',
]);

if ($response->isSuccessful()) {
    $amount = $response->getAmount();
    $rates  = $response->getRates();
}

Create, Track & Bill a Shipment

$shipment = Sendbox::createShipment($payload);
$tracking = Sendbox::trackShipment($shipment->getTrackingCode());
$billed   = Sendbox::billShipment($shipment->getTrackingCode());

Testing

vendor/bin/phpunit