PHPackages                             enan/pathao-courier - 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. enan/pathao-courier

ActiveLibrary[API Development](/categories/api)

enan/pathao-courier
===================

A complete Laravel package for Pathao Courier

v1.0.3(3mo ago)1560711MITPHPPHP ^8.1CI failing

Since Dec 14Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/enuenan/pathao-courier)[ Packagist](https://packagist.org/packages/enan/pathao-courier)[ Docs](https://github.com/enuenan/pathao-courier)[ RSS](/packages/enan-pathao-courier/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (9)Versions (11)Used By (0)

 [![](https://camo.githubusercontent.com/2977f4380e0752bb75f7fc79de81371379d43b9d6d1d0908bc99ec0d63059205/68747470733a2f2f6d6f616d6d65722d656e616e2e636f6d2f706f7274666f6c696f2f6173736574732f696d672f50617468616f5f436f75726965725f4150495f496e746567726174696f6e5f776974685f4c61726176656c2e706e67)](https://camo.githubusercontent.com/2977f4380e0752bb75f7fc79de81371379d43b9d6d1d0908bc99ec0d63059205/68747470733a2f2f6d6f616d6d65722d656e616e2e636f6d2f706f7274666f6c696f2f6173736574732f696d672f50617468616f5f436f75726965725f4150495f496e746567726174696f6e5f776974685f4c61726176656c2e706e67)

A complete Laravel Package for Pathao Courier
=============================================

[](#a-complete-laravel-package-for-pathao-courier)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d766596cda6c5190c381af726e5230d81fee58b8757d62e4060330536639e527/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e616e2f70617468616f2d636f75726965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enan/pathao-courier)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c46231abe030d570665562f66c11b7f9f2410a7222f014b5737c376875b6bbc1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656e616e2f70617468616f2d636f75726965722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/enan/pathao-courier/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/3bdaad946b0e9da4e0143a2c2a42ea7497e933ceadd96e312976dd2baf39b463/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656e616e2f70617468616f2d636f75726965722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/enan/pathao-courier/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/79fd513276b112e55d1ffcaaec37e11012553e8d93e4ee246142ee1cfd2caa00/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e616e2f70617468616f2d636f75726965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enan/pathao-courier)

A complete package for Laravel to use [Pathao Courier Merchant API](https://merchant.pathao.com/). Setup once and forget about it. You don’t even have to worry about the validation of creating orders, creating a store, or getting calculated price value which are generally a POST request on the Pathao courier end.
With this package you can get the following

- Get the city list
- Get the zone list
- Get the area list
- Get the store list
- Create Store
- Get order details
- Get calculated price
- Get the token exipiration days left and also expected date of it
- Get the user success rate using phone number [![New](https://camo.githubusercontent.com/7fc8ba971c9405020464ddced48a2142334cc2f0f33cd2385ad9ad50a70cf5ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e65772d627269676874677265656e)](https://camo.githubusercontent.com/7fc8ba971c9405020464ddced48a2142334cc2f0f33cd2385ad9ad50a70cf5ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e65772d627269676874677265656e)

It offers you a bunch of validation for Create order, Create Store, Get calculated price.So you don't have to worry about the validation for all of this.

⚙️ Installation
---------------

[](#️-installation)

You can install the package via composer:

```
composer require enan/pathao-courier
```

You can publish the migration file and config file with:

```
php artisan vendor:publish --tag="pathao-courier-config"
```

Though Laravel auto discover. If not add the following in `config\app.php`. You can skip this part if you want.

```
// add below line in the providers array
Enan\PathaoCourier\PathaoCourierServiceProvider::class,

// add below line in the alias array
'PathaoCourier' => Enan\PathaoCourier\Facades\PathaoCourier::class,
```

> Add the following environment variables to your `.env` file. You can choose the table name of migration before running the migration. Default is 'pathao-courier'

```
PATHAO_DB_TABLE_NAME='pathao-courier'
PATHAO_CLIENT_ID=
PATHAO_CLIENT_SECRET=
PATHAO_SECRET_TOKEN=
```

### 🔑 Where can I find the value?

[](#-where-can-i-find-the-value)

Go to your [Pathao Developers Api](https://merchant.pathao.com/courier/developer-api) and you'll find `Merchant API Credentials` there. And for `PATHAO_SECRET_TOKEN=` you'll be provided it after the successfull authentication.

### 🎫 Setup

[](#-setup)

Run the migration

```
php artisan migrate
```

You have to set the token of pathao courier. To set run below artisan command
The command will ask the credentials. This is a one time process. You don't have to setup this again.
If you want to update current token and secret you can run the command again.
You will be provided a secret token here. Please set the token in your `.env` file with `PATHAO_SECRET_TOKEN=`

```
php artisan set:pathao-courier
```

🏗 Usage
-------

[](#-usage)

Add the Facade before using

```
use Enan\PathaoCourier\Facades\PathaoCourier;
```

> For the POST type response the required validation are mentioned before the function like &lt;required, string&gt; So here the value should be required and string

```
/**
 * To Get the days left of token expiration
 * You'll get the expected date of the expiration and total days left
 *
 * @type
 */
PathaoCourier::GET_ACCESS_TOKEN_EXPIRY_DAYS_LEFT();

/**
 * To Get the cities
 *
 * @type
 */
PathaoCourier::GET_CITIES();

/**
 * To Get the Zones
 * @type
 *
 * @param int $city_id
 */
PathaoCourier::GET_ZONES(int $city_id);

/**
 * To Get the Areas
 * @type
 *
 * @param int $zone_id
 */
PathaoCourier::GET_AREAS(int $zone_id);

/**
 * To Get the Stores
 * @type
 *
 * @param int $page
 * $page param is optional. If you want you can implement pagination here.
 */
PathaoCourier::GET_STORES(int $page);

/**
 * To Create Store
 * @type
 * Pass below mentioned parameter
 *
 * @param $name
 * @param $contact_name
 * @param $contact_number
 * @param $address
 * @param $city_id
 * @param $zone_id
 * @param $area_id
 */
PathaoCourier::CREATE_STORE($request);

/**
 * To Create Order
 * @type
 * Pass below mentioned parameter
 *
 * @param $store_id
 * @param $merchant_order_id
 * @param $sender_name
 * @param $sender_phone
 * @param $recipient_name
 * @param $recipient_phone
 * @param $recipient_address
 * @param $recipient_city
 * @param $recipient_zone
 * @param $recipient_area
 * @param $delivery_type     is provided by the merchant and not changeable. 48 for Normal Delivery, 12 for On Demand Delivery"
 * @param $item_type     is provided by the merchant and not changeable. 1 for Document, 2 for Parcel"
 * @param $special_instruction
 * @param $item_quantity
 * @param $item_weight
 * @param $amount_to_collect
 * @param $item_description
 */
PathaoCourier::CREATE_ORDER($request);

/**
 * To Get Price Calculation
 * @type
 * Pass below mentioned parameter
 *
 * @param $delivery_type
 * @param $item_type
 * @param $item_weight
 * @param $recipient_city
 * @param $recipient_zone
 * @param $store_id
 */
PathaoCourier::GET_PRICE_CALCULATION($request);

/**
 * To View Order
 * @type
 * @param string $consignment_id
 */
PathaoCourier::VIEW_ORDER(string $consignment_id);

/**
 * To Get User's success rate using phone number
 * @type
 * @param string $phone
 */
PathaoCourier::GET_USER_SUCCESS_RATE($request);
```

Credits
-------

[](#credits)

- [Moammer Farshid Enan](https://github.com/Enan)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Check me on
-----------

[](#check-me-on)

- [Portfolio](https://moammer-enan.com/)
- [Facebook](https://www.facebook.com/moammerfarshidenan)
- [GitHub](https://github.com/enuenan)
- [LinkedIn](https://www.linkedin.com/in/moammer-farshid/)

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance78

Regular maintenance activity

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 72.7% 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 ~85 days

Recently: every ~156 days

Total

10

Last Release

118d ago

Major Versions

v0.1.5 → v1.0.02024-05-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/8320db98b9cb2b2375c07b8ef0c3fd2ecbee6ffea18ca147edecdce47b6bc4fa?d=identicon)[enuenan](/maintainers/enuenan)

---

Top Contributors

[![enuenan](https://avatars.githubusercontent.com/u/30136410?v=4)](https://github.com/enuenan "enuenan (16 commits)")[![Enan54](https://avatars.githubusercontent.com/u/167304086?v=4)](https://github.com/Enan54 "Enan54 (5 commits)")[![SahadatHossenHQ](https://avatars.githubusercontent.com/u/61725422?v=4)](https://github.com/SahadatHossenHQ "SahadatHossenHQ (1 commits)")

---

Tags

apicouriercourier-apicourier-api-integrationlaravel-packagepathaopathao-apipathao-api-integrationpathao-courierpathao-courier-laravelpathao-developer-apipathao-merchantpathao-merchant-apipathao-merchant-laravel-apilaravelMoammer Farshid Enanpathao-courier

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/enan-pathao-courier/health.svg)

```
[![Health](https://phpackages.com/badges/enan-pathao-courier/health.svg)](https://phpackages.com/packages/enan-pathao-courier)
```

###  Alternatives

[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)[codebar-ag/laravel-zammad

Zammad integration with Laravel

106.1k](/packages/codebar-ag-laravel-zammad)[xelon-ag/vmware-php-client

PHP API Client for VmWare

114.3k](/packages/xelon-ag-vmware-php-client)

PHPackages © 2026

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