Download the PHP package kejubayer/steadfast-api-integration without Composer

On this page you can find all versions of the php package kejubayer/steadfast-api-integration. 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 steadfast-api-integration

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

Requirements

Installation

Install the package with Composer:

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

Publish Configuration

Publish the package configuration file:

This creates:

Environment Configuration

Add your Steadfast Courier API credentials to .env:

Configuration Reference

Key Environment Variable Default Description
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

Run migrations to create the webhook status table:

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

Basic Usage

Import the facade:

Create Parcel

Bulk Create Parcels

Track Parcel

Track by consignment ID:

Track by invoice:

Track by tracking code:

Check Balance

Available Methods

Method Description Returns
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 array

Webhook Documentation

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

Webhook route example for your Steadfast dashboard:

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

Webhook payloads are stored in the steadfast_parcel_statuses table.

Column Type Description
id bigint Primary key.
notification_type string Webhook notification type.
consignment_id string Steadfast consignment ID.
invoice string, nullable Merchant invoice number.
cod_amount decimal, nullable COD amount from delivery status payload.
status string, nullable Delivery status.
delivery_charge decimal, nullable Delivery charge from delivery status payload.
tracking_message text, nullable Tracking or delivery message.
provider_updated_at timestamp, nullable Steadfast's updated_at value.
payload json, nullable Full original webhook payload.
created_at timestamp Local database creation timestamp.
updated_at timestamp Local database update timestamp.

Reading Stored Webhook Statuses

Use the included Eloquent model:

Error Handling

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

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

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

Troubleshooting

Problem Solution
401 or authentication error Check STEADFAST_API_KEY and STEADFAST_SECRET_KEY.
Webhook returns 404 Confirm STEADFAST_WEBHOOK_ENABLED=true and verify STEADFAST_WEBHOOK_PATH.
Webhook validation fails Check notification_type and required fields for that webhook type.
Webhook data is not stored Run php artisan migrate and confirm the database connection works.
API request times out Increase STEADFAST_TIMEOUT in .env.

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

The MIT License.


All versions of steadfast-api-integration with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
guzzlehttp/guzzle Version ^7.0
illuminate/database Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/http Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/routing Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.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 kejubayer/steadfast-api-integration contains the following files

Loading the files please wait ...