PHPackages                             shibin/aramex-laravel - 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. shibin/aramex-laravel

ActiveLibrary[API Development](/categories/api)

shibin/aramex-laravel
=====================

A clean, modern Laravel Aramex SDK with WSDL handling and DTO-based requests.

v1.0.1(5mo ago)05MITPHP

Since Nov 19Pushed 5mo agoCompare

[ Source](https://github.com/cpshibinoppo/shibin-aramex-laravel)[ Packagist](https://packagist.org/packages/shibin/aramex-laravel)[ RSS](/packages/shibin-aramex-laravel/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Aramex SDK 🚀
====================

[](#laravel-aramex-sdk-)

A clean, modern, Laravel SDK for **Aramex Shipping Services**.
Designed to be simple enough for junior developers and powerful enough for production.

 [![](https://camo.githubusercontent.com/0e006c04db7d5c1660d814388bcaf3b56508c6be32531fbca44d14b001613d7c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d626c75653f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/0e006c04db7d5c1660d814388bcaf3b56508c6be32531fbca44d14b001613d7c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d626c75653f7374796c653d666f722d7468652d6261646765) [![Total Downloads](https://camo.githubusercontent.com/ed68650661eb1d84d2535d144494e595ebbab7e5c56f4660f427629b3b164445/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686962696e2f6172616d65782d6c61726176656c3f7374796c653d666f722d7468652d626164676526636f6c6f723d707572706c65)](https://camo.githubusercontent.com/ed68650661eb1d84d2535d144494e595ebbab7e5c56f4660f427629b3b164445/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686962696e2f6172616d65782d6c61726176656c3f7374796c653d666f722d7468652d626164676526636f6c6f723d707572706c65) [![](https://camo.githubusercontent.com/4d07c352d2dc02e9bcffdc560cc29b987ffd460f26462a76f24fedcdde910e56/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374617475732d537461626c652d627269676874677265656e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/4d07c352d2dc02e9bcffdc560cc29b987ffd460f26462a76f24fedcdde910e56/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374617475732d537461626c652d627269676874677265656e3f7374796c653d666f722d7468652d6261646765)

---

📑 Table of Contents
-------------------

[](#-table-of-contents)

- [Features](#-features)
- [Installation](#-installation)
- [Configuration](#%EF%B8%8F-configuration)
- [DTO Reference](#-dto-reference)
- [Usage Examples](#-usage-examples)
    - [Fetch Locations](#-fetch-locations)
    - [Calculate Shipping Rates](#-calculate-shipping-rates)
    - [Create a Shipment](#-create-a-shipment)
    - [Print Labels](#-print-labels)
    - [Track Shipments](#-track-shipments)
    - [Schedule a Pickup](#-schedule-a-pickup)

---

🚀 Features
----------

[](#-features)

- ✅ Create Shipments
- ✅ Track Shipments
- ✅ Calculate Rates
- ✅ Create Pickups
- ✅ Validate Addresses
- ✅ Fetch Countries &amp; Cities
- ✅ **Fully Typed DTOs** (Data Transfer Objects)
- ✅ Automatic **TEST / LIVE** WSDL switching
- ✅ Laravel auto-discovery

---

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require shibin/aramex-laravel
```

---

⚙️ Configuration
----------------

[](#️-configuration)

### 1. Publish Config

[](#1-publish-config)

Publish the configuration file to customize settings if necessary:

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

### 2. Environment Setup

[](#2-environment-setup)

Add the following variables to your `.env` file.

**Note:** Ensure `ARAMEX_ACCOUNT_COUNTRY` matches the country of your account issuance (e.g., JO for Jordan, IN for India).

```
# Environment: TEST or LIVE
ARAMEX_ENV=TEST

# Credentials
ARAMEX_TEST_ACCOUNT_NUMBER=20016
ARAMEX_TEST_USERNAME=testingapi@aramex.com
ARAMEX_TEST_PASSWORD=R123456789$r
ARAMEX_TEST_ACCOUNT_PIN=331421
ARAMEX_TEST_ACCOUNT_ENTITY=AMM
ARAMEX_TEST_ACCOUNT_COUNTRY=JO
```

---

🧱 DTO Reference
---------------

[](#-dto-reference)

This package uses Data Transfer Objects (DTOs) to ensure data integrity.

### Address DTO

[](#address-dto)

Used for Origin, Destination, Shipper, and Consignee.

```
use Shibin\Aramex\DTO\Address;

$address = new Address(
    line1: 'Gardens Street',
    city: 'Amman',
    country_code: 'JO',
    name: 'John Doe',
    email: 'john@example.com',
    phone: '0790000000',
    cell_phone: '0790000000',
);
```

### Shipment DTO

[](#shipment-dto)

Defines the details of the package being sent.

```
use Shibin\Aramex\DTO\Shipment;

$shipment = new Shipment(
    shipper: $shipperAddress,     // Address Object
    consignee: $consigneeAddress, // Address Object
    shipping_date_time: time() + 3600,
    due_date: time() + 86400,
    pickup_location: 'Reception',
    weight: 2.5,
    number_of_pieces: 1,
    description: 'Electronics',
    payment_type: 'P', // P = Prepaid, C = Collect
);
```

---

💡 Usage Examples
----------------

[](#-usage-examples)

### 🌍 Fetch Locations

[](#-fetch-locations)

```
use Shibin\Aramex\Facades\Aramex;

// Get all countries
$countries = Aramex::location()->countries();

// Get cities within a country
$cities = Aramex::location()->cities('SA'); // Saudi Arabia
```

### 💰 Calculate Shipping Rates

[](#-calculate-shipping-rates)

```
use Shibin\Aramex\Facades\Aramex;
use Shibin\Aramex\DTO\Address;
use Shibin\Aramex\DTO\RateRequest;

// 1. Define Origin & Destination
$origin = new Address(line1: 'Street', city: 'Amman', country_code: 'JO');
$destination = new Address(line1: 'Street', city: 'Jeddah', country_code: 'SA');

// 2. Create Request
$request = new RateRequest(
    origin: $origin,
    destination: $destination,
    weight: 5.0,
    pieces: 1,
    currency: 'USD'
);

// 3. Calculate
$response = Aramex::rates()->calculate($request);
```

### 📦 Create a Shipment

[](#-create-a-shipment)

```
use Shibin\Aramex\Facades\Aramex;
use Shibin\Aramex\DTO\Address;
use Shibin\Aramex\DTO\Shipment;

$shipper = new Address(
    line1: 'Gardens St', city: 'Amman', country_code: 'JO',
    name: 'Shipper Name', email: 'shipper@test.com', phone: '0790000000'
);

$consignee = new Address(
    line1: 'Fahad Rd', city: 'Riyadh', country_code: 'SA',
    name: 'Receiver Name', email: 'receiver@test.com', phone: '0500000000'
);

$shipment = new Shipment(
    shipper: $shipper,
    consignee: $consignee,
    shipping_date_time: time() + 3600,
    due_date: time() + 86400,
    comments: 'Handle with care',
    pickup_location: 'Reception',
    weight: 2.5,
    number_of_pieces: 1,
    description: 'Electronics',
    payment_type: 'P'
);

$response = Aramex::shipments()->create($shipment);

// Access the Waybill Number
$waybill = $response->Shipments->ProcessedShipment->ID ?? null;
```

### 🖨 Print Labels

[](#-print-labels)

You can download the shipment label as a PDF.

```
$shipmentNumber = "37133804481"; // The ID from the create shipment response

$response = Aramex::shipments()->printLabel($shipmentNumber);

if (isset($response->ShipmentLabel->LabelFileContents)) {
    $pdfContent = $response->ShipmentLabel->LabelFileContents;

    // Save to storage
    Storage::disk('public')->put("label_{$shipmentNumber}.pdf", $pdfContent);
}
```

### 🔍 Track Shipments

[](#-track-shipments)

```
$waybill = "37133804481";
$response = Aramex::tracking()->track([$waybill]);
```

### 🚚 Schedule a Pickup

[](#-schedule-a-pickup)

```
use Shibin\Aramex\DTO\Pickup;

$pickup = new Pickup();
$pickup->address = $addressObject;
$pickup->pickup_location = 'Reception';
$pickup->pickup_date = strtotime('+1 day');
$pickup->ready_time = strtotime('10:00', $pickup->pickup_date);
$pickup->last_pickup_time = strtotime('15:00', $pickup->pickup_date);
$pickup->closing_time = strtotime('17:00', $pickup->pickup_date);
$pickup->weight = 5;
$pickup->volume = 2;

$response = Aramex::pickup()->create($pickup);
```

### ✅ Validate Address

[](#-validate-address)

```
$isValid = Aramex::location()->validateAddress($addressObject);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance70

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

174d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/af75c56ae58ce84d2d94fc2735063b8f6232f16ef4547463506b98cd77a10d7e?d=identicon)[cpshibinoppo](/maintainers/cpshibinoppo)

---

Top Contributors

[![cpshibinoppo](https://avatars.githubusercontent.com/u/89115093?v=4)](https://github.com/cpshibinoppo "cpshibinoppo (8 commits)")

### Embed Badge

![Health badge](/badges/shibin-aramex-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/shibin-aramex-laravel/health.svg)](https://phpackages.com/packages/shibin-aramex-laravel)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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