PHPackages                             laraditz/courier-lalamove - 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. laraditz/courier-lalamove

ActiveLibrary[API Development](/categories/api)

laraditz/courier-lalamove
=========================

Lalamove driver for laraditz/courier.

014—0%PHP

Since Jun 23Pushed 2w agoCompare

[ Source](https://github.com/laraditz/courier-lalamove)[ Packagist](https://packagist.org/packages/laraditz/courier-lalamove)[ RSS](/packages/laraditz-courier-lalamove/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Courier Lalamove
================

[](#courier-lalamove)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d0d62e2644f83174380104715c14bd52dd1be9d3f25265ffe0720cc12d17edfe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172616469747a2f636f75726965722d6c616c616d6f76652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/courier-lalamove)[![Total Downloads](https://camo.githubusercontent.com/b6b89d46387c27130d227385faa6a6315223fbfe35a46327dba33fe7ce2a4d1e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172616469747a2f636f75726965722d6c616c616d6f76652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/courier-lalamove)[![License](https://camo.githubusercontent.com/12b95c8dcc376cd0ffcead3e8f9d008d21bd1548f3d60c13a7f7cd581d182866/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6172616469747a2f636f75726965722d6c616c616d6f76652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/courier-lalamove)

Lalamove driver for [laraditz/courier](https://github.com/laraditz/courier). Provides rate quotes, order creation, tracking, cancellation, and real-time webhook events via the Lalamove v3 API.

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, 12, or 13
- [laraditz/courier](https://github.com/laraditz/courier)

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

[](#installation)

```
composer require laraditz/courier-lalamove
```

The service provider is auto-discovered. Publish the config file if you need to customise defaults:

```
php artisan vendor:publish --tag=courier-lalamove-config
```

Configuration
-------------

[](#configuration)

Add the following keys to your `.env` file:

```
LALAMOVE_API_KEY=your-api-key
LALAMOVE_API_SECRET=your-api-secret
LALAMOVE_SANDBOX=false
LALAMOVE_MARKET=MY
LALAMOVE_WEBHOOK_SECRET=your-webhook-secret
```

Then register the driver in `config/courier.php` (or however your `laraditz/courier` is configured):

```
'drivers' => [
    'lalamove' => [
        'key'            => env('LALAMOVE_API_KEY'),
        'secret'         => env('LALAMOVE_API_SECRET'),
        'sandbox'        => env('LALAMOVE_SANDBOX', false),
        'market'         => env('LALAMOVE_MARKET', 'MY'),
        'webhook_secret' => env('LALAMOVE_WEBHOOK_SECRET'),
    ],
],
```

Usage
-----

[](#usage)

Resolve the driver through the `courier` manager:

```
$lalamove = courier()->driver('lalamove');
```

### Get rates

[](#get-rates)

```
use Laraditz\Courier\DTOs\Payloads\RatePayload;
use Laraditz\Courier\DTOs\Address;

$payload = new RatePayload(
    serviceCode:  'MOTORCYCLE',
    origin:       new Address(lat: 3.1569, lng: 101.7123, city: 'Kuala Lumpur', country: 'MY'),
    destination:  new Address(lat: 3.0738, lng: 101.5183, city: 'Petaling Jaya', country: 'MY'),
);

$rates = $lalamove->getRates($payload);
```

### Create a shipment

[](#create-a-shipment)

```
use Laraditz\Courier\DTOs\Payloads\ShipmentPayload;
use Laraditz\Courier\DTOs\Contact;

$payload = new ShipmentPayload(
    serviceCode: 'MOTORCYCLE',
    sender:      new Contact(name: 'Alice', phone: '+60123456789', lat: 3.1569, lng: 101.7123, line1: 'Jalan Ampang', city: 'Kuala Lumpur'),
    recipient:   new Contact(name: 'Bob',   phone: '+60198765432', lat: 3.0738, lng: 101.5183, line1: 'Jalan SS2',    city: 'Petaling Jaya'),
);

$shipment = $lalamove->createShipment($payload);
// $shipment->waybillNumber — use this as the order ID for subsequent calls
```

Pass a pre-fetched quotation ID to skip the auto-quotation step:

```
$shipment = $lalamove->withQuotationId('QID-123')->createShipment($payload);
```

### Track an order

[](#track-an-order)

```
$tracking = $lalamove->track($waybillNumber);

echo $tracking->status;      // pending | processing | in_transit | delivered | cancelled | failed
echo $tracking->meta['share_link'];
```

#### Status mapping

[](#status-mapping)

Lalamove statusMapped statusASSIGNING\_DRIVERpendingON\_GOINGprocessingPICKED\_UPin\_transitCOMPLETEDdeliveredCANCELEDcancelledREJECTEDfailedEXPIREDfailed### Cancel an order

[](#cancel-an-order)

```
$result = $lalamove->cancelShipment($waybillNumber);
```

### Check service availability

[](#check-service-availability)

```
use Laraditz\Courier\DTOs\Payloads\AvailabilityPayload;

$services = $lalamove->getAvailability(new AvailabilityPayload());
```

### Switch market at runtime

[](#switch-market-at-runtime)

```
$sgDriver = $lalamove->market('SG');
```

### Lalamove-specific operations

[](#lalamove-specific-operations)

```
// Get live driver location
$location = $lalamove->getDriverLocation($orderId, $driverId);

// Remove the assigned driver
$lalamove->removeDriver($orderId, $driverId);

// Add a priority fee
$lalamove->addPriorityFee($orderId, ['amount' => '10', 'currency' => 'MYR']);

// Edit a stop
$lalamove->editStop($orderId, $stopId, ['address' => '...', 'coordinates' => [...]]);
```

Webhooks
--------

[](#webhooks)

The driver implements `HandlesWebhooks` and verifies incoming requests using the `X-LLM-Token` header against `LALAMOVE_WEBHOOK_SECRET`.

Register a webhook route and delegate to the courier manager:

```
// routes/api.php
Route::post('/webhooks/lalamove', function (Request $request) {
    courier()->driver('lalamove')->handleWebhook($request);
});
```

### Webhook events

[](#webhook-events)

Listen for these events in your `EventServiceProvider`:

Event classFired when`Laraditz\Courier\Lalamove\Events\OrderStatusChanged``order.status.updated` received`Laraditz\Courier\Lalamove\Events\DriverAssigned``driver.assigned` received`Laraditz\Courier\Lalamove\Events\PodStatusChanged``pod.status.updated` received#### `OrderStatusChanged`

[](#orderstatuschanged)

```
public string $orderId;
public string $status;       // raw Lalamove status
public string $mappedStatus; // normalised status (see table above)
public array  $raw;
```

#### `DriverAssigned`

[](#driverassigned)

```
public string $orderId;
public string $driverId;
public array  $driverInfo;
public array  $raw;
```

#### `PodStatusChanged`

[](#podstatuschanged)

```
public string $orderId;
public string $stopId;
public string $podStatus;
public array  $raw;
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT. See [LICENSE](LICENSE) for details.

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance63

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1203676?v=4)[Raditz Farhan](/maintainers/raditzfarhan)[@raditzfarhan](https://github.com/raditzfarhan)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/laraditz-courier-lalamove/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)

PHPackages © 2026

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