PHPackages                             kejubayer/steadfast-api-integration - 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. kejubayer/steadfast-api-integration

ActiveLibrary[API Development](/categories/api)

kejubayer/steadfast-api-integration
===================================

Laravel Steadfast Courier API integration package for parcel creation, bulk orders, tracking, balance checks, delivery status webhooks, and tracking update storage.

1.0.1(4w ago)03↓100%MITPHPPHP &gt;=7.4

Since May 12Pushed 4w agoCompare

[ Source](https://github.com/kejubayer/steadfast-api-integration)[ Packagist](https://packagist.org/packages/kejubayer/steadfast-api-integration)[ RSS](/packages/kejubayer-steadfast-api-integration/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

Steadfast Courier API Integration for Laravel
=============================================

[](#steadfast-courier-api-integration-for-laravel)

A Laravel package for integrating the Steadfast Courier API into Laravel applications. Use this package to create Steadfast parcels, create bulk parcel orders, track consignments, check account balance, receive delivery status webhooks, and store parcel status updates in your database.

This package is useful for Laravel e-commerce, order management, inventory, courier, logistics, and COD delivery systems in Bangladesh that need a clean Steadfast Courier API integration.

Features
--------

[](#features)

- Create a single Steadfast parcel order
- Create bulk parcel orders
- Track parcels by consignment ID
- Track parcels by invoice
- Track parcels by tracking code
- Check Steadfast account balance
- Receive delivery status webhook notifications
- Store webhook payloads in the `steadfast_parcel_statuses` table
- Laravel facade and service container binding
- Publishable configuration and migrations

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

[](#requirements)

- PHP 7.4 or higher
- Laravel 8, 9, 10, 11, or 12
- Steadfast API key and secret key

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

[](#installation)

Install the package with Composer:

```
composer require kejubayer/steadfast-api-integration
```

Laravel package auto-discovery will register the service provider and facade automatically.

Publish Configuration
---------------------

[](#publish-configuration)

Publish the package configuration file:

```
php artisan vendor:publish --tag=steadfast-config
```

This creates:

```
config/steadfast.php

```

Environment Configuration
-------------------------

[](#environment-configuration)

Add your Steadfast Courier API credentials to `.env`:

```
STEADFAST_API_KEY=your-api-key
STEADFAST_SECRET_KEY=your-secret-key
STEADFAST_BASE_URL=https://portal.packzy.com/api/v1
STEADFAST_TIMEOUT=30

STEADFAST_WEBHOOK_ENABLED=true
STEADFAST_WEBHOOK_PATH=steadfast/webhook
```

Configuration Reference
-----------------------

[](#configuration-reference)

KeyEnvironment VariableDefaultDescription`base_url``STEADFAST_BASE_URL``https://portal.packzy.com/api/v1`Steadfast Courier API base URL.`api_key``STEADFAST_API_KEY``null`Your Steadfast API key.`secret_key``STEADFAST_SECRET_KEY``null`Your Steadfast secret key.`timeout``STEADFAST_TIMEOUT``30`HTTP request timeout in seconds.`webhook.enabled``STEADFAST_WEBHOOK_ENABLED``true`Enables or disables the package webhook route.`webhook.path``STEADFAST_WEBHOOK_PATH``steadfast/webhook`Webhook URL path used by Steadfast.`webhook.middleware`Config only`['api']`Middleware applied to the webhook route.Database Migration
------------------

[](#database-migration)

Run migrations to create the webhook status table:

```
php artisan migrate
```

The package loads its migration automatically. You can also publish the migration if you want to customize the table:

```
php artisan vendor:publish --tag=steadfast-migrations
```

Basic Usage
-----------

[](#basic-usage)

Import the facade:

```
use Kejubayer\Steadfast\Facades\Steadfast;
```

Create Parcel
-------------

[](#create-parcel)

```
$parcel = Steadfast::createParcel([
    'invoice' => 'INV-1001',
    'recipient_name' => 'Customer Name',
    'recipient_phone' => '01700000000',
    'recipient_address' => 'Dhaka, Bangladesh',
    'cod_amount' => 1500,
]);
```

Bulk Create Parcels
-------------------

[](#bulk-create-parcels)

```
$bulk = Steadfast::bulkCreate([
    [
        'invoice' => 'INV-1002',
        'recipient_name' => 'Customer One',
        'recipient_phone' => '01700000000',
        'recipient_address' => 'Dhaka, Bangladesh',
        'cod_amount' => 1500,
    ],
    [
        'invoice' => 'INV-1003',
        'recipient_name' => 'Customer Two',
        'recipient_phone' => '01800000000',
        'recipient_address' => 'Chattogram, Bangladesh',
        'cod_amount' => 2200,
    ],
]);
```

Track Parcel
------------

[](#track-parcel)

Track by consignment ID:

```
$status = Steadfast::track('12345');
```

Track by invoice:

```
$status = Steadfast::trackByInvoice('INV-1001');
```

Track by tracking code:

```
$status = Steadfast::trackByTrackingCode('tracking-code');
```

Check Balance
-------------

[](#check-balance)

```
$balance = Steadfast::getBalance();
```

Available Methods
-----------------

[](#available-methods)

MethodDescriptionReturns`createParcel(array $data): array`Creates a single Steadfast parcel order.API response array`bulkCreate(array $data): array`Creates multiple Steadfast parcel orders.API response array`track(string $consignmentId): array`Tracks parcel status by consignment ID.API response array`trackByInvoice(string $invoice): array`Tracks parcel status by invoice number.API response array`trackByTrackingCode(string $trackingCode): array`Tracks parcel status by tracking code.API response array`getBalance(): array`Returns Steadfast account balance information.API response arrayWebhook Documentation
---------------------

[](#webhook-documentation)

The package registers a webhook endpoint for Steadfast delivery status notifications:

```
POST /steadfast/webhook

```

Webhook route example for your Steadfast dashboard:

```
https://your-domain.com/steadfast/webhook

```

If you change `STEADFAST_WEBHOOK_PATH`, use that custom path instead. Every valid webhook request creates a new row in the `steadfast_parcel_statuses` table. This keeps a history of parcel delivery status changes.

Stored Webhook Data Reference
-----------------------------

[](#stored-webhook-data-reference)

Webhook payloads are stored in the `steadfast_parcel_statuses` table.

ColumnTypeDescription`id`bigintPrimary key.`notification_type`stringWebhook notification type.`consignment_id`stringSteadfast consignment ID.`invoice`string, nullableMerchant invoice number.`cod_amount`decimal, nullableCOD amount from delivery status payload.`status`string, nullableDelivery status.`delivery_charge`decimal, nullableDelivery charge from delivery status payload.`tracking_message`text, nullableTracking or delivery message.`provider_updated_at`timestamp, nullableSteadfast's `updated_at` value.`payload`json, nullableFull original webhook payload.`created_at`timestampLocal database creation timestamp.`updated_at`timestampLocal database update timestamp.Reading Stored Webhook Statuses
-------------------------------

[](#reading-stored-webhook-statuses)

Use the included Eloquent model:

```
use Kejubayer\Steadfast\Models\SteadfastParcelStatus;

$latestStatus = SteadfastParcelStatus::where('invoice', 'INV-67890')
    ->latest('provider_updated_at')
    ->first();

$history = SteadfastParcelStatus::where('consignment_id', '12345')
    ->orderBy('provider_updated_at')
    ->get();
```

Error Handling
--------------

[](#error-handling)

API methods may throw exceptions from Guzzle or JSON parsing. Handle them in your application when needed:

```
use GuzzleHttp\Exception\GuzzleException;
use JsonException;

try {
    $parcel = Steadfast::createParcel($data);
} catch (GuzzleException|JsonException $exception) {
    report($exception);
}
```

If Steadfast returns `401 Unauthorized` with `Account is not active!` while creating a parcel, the package throws a clearer message:

```
Your Steadfast account is not active. Please contact Steadfast authority to activate your account before creating parcels.

```

Webhook requests return Laravel validation errors if required fields are missing or invalid.

Troubleshooting
---------------

[](#troubleshooting)

ProblemSolution`401` or authentication errorCheck `STEADFAST_API_KEY` and `STEADFAST_SECRET_KEY`.Webhook returns `404`Confirm `STEADFAST_WEBHOOK_ENABLED=true` and verify `STEADFAST_WEBHOOK_PATH`.Webhook validation failsCheck `notification_type` and required fields for that webhook type.Webhook data is not storedRun `php artisan migrate` and confirm the database connection works.API request times outIncrease `STEADFAST_TIMEOUT` in `.env`.Keywords
--------

[](#keywords)

Laravel Steadfast Courier API integration, Steadfast Laravel package, Steadfast Courier Bangladesh API, Laravel courier API, Laravel COD delivery integration, Laravel parcel tracking, Steadfast webhook, Steadfast delivery status webhook.

License
-------

[](#license)

The MIT License.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance94

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Total

2

Last Release

28d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6655d8864b90508fae52cbbe858c707383d8e63541ca477ba9d1790e63c729d6?d=identicon)[kejubayer](/maintainers/kejubayer)

---

Top Contributors

[![kejubayer](https://avatars.githubusercontent.com/u/47379243?v=4)](https://github.com/kejubayer "kejubayer (2 commits)")

---

Tags

steadfast courierSteadFastparcel-trackinglaravel-steadfaststeadfast apisteadfast courier apisteadfast laravellaravel courier apilaravel delivery apilaravel parcel trackinglaravel cod deliverycourier api bangladeshdelivery status webhooktracking webhookecommerce deliverycod courier

### Embed Badge

![Health badge](/badges/kejubayer-steadfast-api-integration/health.svg)

```
[![Health](https://phpackages.com/badges/kejubayer-steadfast-api-integration/health.svg)](https://phpackages.com/packages/kejubayer-steadfast-api-integration)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9732.3M121](/packages/roots-acorn)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1232.2k16](/packages/fleetbase-core-api)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

268880.7k3](/packages/laravel-cashier-paddle)[api-platform/laravel

API Platform support for Laravel

59156.3k10](/packages/api-platform-laravel)

PHPackages © 2026

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