Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Pathao Courier

Pathao Courier Laravel Package

enan/pathao-courier

A Laravel wrapper for Pathao Courier that simplifies integrating delivery services into your app, with support for creating orders, calculating delivery charges, tracking parcels, and managing courier statuses via a clean, configurable API.

View on GitHub
Deep Wiki
Context7

A complete Laravel package for Pathao Merchant Courier

Frequently asked questions about Pathao Courier
How do I install and configure enan/pathao-courier in a Laravel app?
Install it with Composer, publish the package config, and add your Pathao merchant credentials as PATHAO_* environment variables. Laravel auto-discovery should register the service provider and facade, but confirm the aliases do not collide with existing bindings. Before committing, check the composer.json constraints against your app's Laravel, PHP, Illuminate HTTP, and Guzzle versions. Keep credentials out of source control and use separate sandbox and production configs.
Which Laravel and PHP versions does pathao-courier support?
The package targets modern Laravel with package auto-discovery and a publishable config file. The technical assessment points to Laravel 10 through 12 and PHP 8.1 or newer as the expected stack, but the composer.json is the source of truth and should be checked against your host application. Also verify the Illuminate HTTP client and Guzzle version pins before upgrading Laravel.
How does enan/pathao-courier authenticate with the Pathao Courier API?
Authentication uses Pathao merchant credentials supplied through the published config, and the package's HTTP client layer handles the merchant REST API calls. The key production question is whether token acquisition and refresh are cached and whether a 401 triggers a safe re-authentication. Confirm this behavior before running order creation from concurrent queue workers, because uncoordinated token refresh can cause intermittent failures.
Can I create a Pathao order and calculate delivery charges from Laravel with this package?
Yes. The package wraps Pathao merchant API endpoints for price quotes and order creation, along with tracking, store, and city, zone, and area lookups. In a spike you can typically publish config, inject credentials, and produce a quote and an order quickly. For production, call it through an app-owned courier gateway rather than directly from controllers or models.
How do I track a Pathao parcel and keep courier statuses in sync?
The package exposes Pathao's tracking endpoint, so you can fetch parcel status by the Pathao identifiers you stored at creation time. Whether status updates arrive by webhook or only by polling is not established by the overview, so verify that before designing your sync flow. Store Pathao IDs, a local status machine, and raw request and response payloads so you can audit and replay updates.
Is enan/pathao-courier production ready or only good for a spike?
It is clearly viable for a spike: Composer install, publish config, add credentials, and you can quote and create orders in a day or two. Production readiness is a different question because the package is young, has a single maintainer, zero dependents, and limited downstream validation. Treat it as an implementation detail behind your own interface, add idempotency keys and audit logging, and confirm token caching, error mapping, rate limits, and endpoint coverage with the maintainer.
How should I handle Pathao API errors and avoid duplicate orders on retries?
Logistics APIs often return business-level failures inside HTTP 200 responses, so verify that the package maps Pathao error codes to exceptions and distinguishes validation failures from timeouts and 5xx responses. Use a merchant order reference or idempotency key so a retried job cannot create a second shipment. Persist every request and response payload so failed orders can be diagnosed and replayed safely.
Does pathao-courier include tests against the Pathao sandbox?
The assessment explicitly flags whether the test suite runs against Pathao's sandbox or only fakes HTTP responses, so inspect the repository tests before relying on them. Http::fake is useful for unit-testing your gateway adapter and error handling, but it does not prove the package matches the live Pathao contract. Request a sandbox integration test and confirm which API version the package targets.
Should I use the Pathao facade directly or wrap it in my own gateway interface?
Wrapping it is the safer choice. Define an internal port such as CourierGateway with quote, createShipment, cancel, track, and listCities methods, plus DTOs and a domain error enum, then bind the package client as one adapter. This keeps order logic independent of a small third-party dependency and lets you swap in a hand-rolled client or a second courier later. The cost is roughly half a sprint and it substantially reduces contract risk.
What are the alternatives to enan/pathao-courier for Pathao integration?
The main alternative is a small Guzzle or Laravel HTTP client written directly against Pathao's merchant REST API, which is essentially what this package provides plus Laravel configuration and facade sugar. For non-Laravel services, that hand-rolled client is usually the better fit because the package's value is framework integration. Other Bangladesh courier packages may exist, but this niche is underserved, so compare endpoint coverage, maintenance cadence, and license terms before choosing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect