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

ActiveLibrary

laraditz/lazada
===============

Laravel package for interacting with Lazada API.

1.0.1(2y ago)1865MITPHPPHP ^8.1

Since Nov 28Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/laraditz/lazada)[ Packagist](https://packagist.org/packages/laraditz/lazada)[ Docs](https://github.com/laraditz/lazada)[ RSS](/packages/laraditz-lazada/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

[![Laravel Wallet](./Banner.png)](./Banner.png)

Laravel Lazada
==============

[](#laravel-lazada)

[![Latest Version on Packagist](https://camo.githubusercontent.com/bca0ec169bb071da07c68e82a3ff371eccdcd6b3f022a00fa160b5463b3ef3dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6172616469747a2f6c617a6164612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/lazada)[![Total Downloads](https://camo.githubusercontent.com/a2c0e759e0657ff07e0077edb1446549d65a465e143967511f3072357d80b02d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172616469747a2f6c617a6164612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/lazada)[![GitHub Actions](https://github.com/laraditz/lazada/actions/workflows/main.yml/badge.svg)](https://github.com/laraditz/lazada/actions/workflows/main.yml/badge.svg)

Laravel package for interacting with Lazada API.

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

[](#requirements)

- PHP 8.1 and above.
- Laravel 9 and above.

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

[](#installation)

You can install the package via composer:

```
composer require laraditz/lazada
```

Before Start
------------

[](#before-start)

Configure your variables in your `.env` (recommended) or you can publish the config file and change it there.

```
LAZADA_APP_KEY=
LAZADA_APP_SECRET=
LAZADA_SELLER_ID=MYXXXXXXXX

```

(Optional) You can publish the config file via this command:

```
php artisan vendor:publish --provider="Laraditz\Lazada\LazadaServiceProvider" --tag="config"
```

Run the migration command to create the necessary database table.

```
php artisan migrate
```

On Lazada Open Platform, configure this **App Callback URL** on your App Management section. Once seller has authorized the app, it will redirect to this URL. Under the hood, it will call API to generate access token so that you do not have to call it manually. If you want to use your own **App Callback URL**, you may specify `LAZADA_APP_CALLBACK_URL` in your `.env`, but you need to manually call the `accessToken()` API to update the access token in your record.

```
// App Callback URL
https://your-app-url.com/lazada/seller/authorized

```

Available Methods
-----------------

[](#available-methods)

Below are all methods available under this package. Parameters for all method calls will follow exactly as in [Lazada Open Platform Documentation](https://open.lazada.com/apps/doc/api).

Service nameMethod nameDescriptionauth()authorizationUrl()Get the authorization URL for seller. Seller needs to login and authorized the app.accessToken()Generate access token for API call.refreshToken()Refresh access token before it expired.accessTokenWithOpenId()Generate access token with openId for API call.seller()get()Get seller information by current seller ID.pickUpStoreList()Return the list of pick up store infomation for requested Seller.order()list()Get an order list from specified date range.get()Get single order detail by order ID.items()Get the item information of an order.finance()payoutStatus()Get your transaction statements created after the provided date.accountTransactions()Query Account Transactions.logisticsFeeDetail()Query logistics fee details from slb.transactionDetail()Query seller transaction details within specific date range.Usage
-----

[](#usage)

You can use service container to make an api call

```
app('lazada')->auth()->authorizationUrl(); // give URL to seller to authorize app
app('lazada')->order()->get(order_id: '16090'); // get specific order
```

or you can use facade

```
use Lazada;
use Laraditz\Lazada\Exceptions\LazadaAPIError;

try {
    // Generate access token. Get the code after seller has authorized the app.
    $accessToken = Lazada::auth()->accessToken(code: '0_123456_XxxXXXXxxXXxxXXXXxxxxxxXXXXxx');
} catch (LazadaAPIError $e) {
    // Catch API Error
    // $e->getMessage()
    // $e->getMessageCode()
    // $e->getRequestId()
    // $e->getResult() // raw response
    throw $e;
} catch (\Throwable $th) {
    throw $th;
}

// Get order list
Lazada::order()->list(created_after: '2023-11-17T00:00:00+08:00');
```

Event
-----

[](#event)

This package also provide an event to allow your application to listen for Lazada web push. You can create your listener and register it under event below.

EventDescriptionLaraditz\\Lazada\\Events\\WebPushReceivedReceive a push content from Lazada.Read more about Lazada Push Mechanism (LPM) [here](https://open.lazada.com/apps/doc/doc?nodeId=29526&docId=120168).

Webhook URL
-----------

[](#webhook-url)

You may setup the Callback URL below on Lazada Open API dashboard, under the Push Mecahnism section so that Lazada will push all content update to this url and trigger the `WebPushReceived` event above.

```
https://your-app-url.com/lazada/webhooks

```

Commands
--------

[](#commands)

```
lazada:flush-expired-token    Flush expired access token.
lazada:refresh-token          Refresh existing access token before it expired.
```

As Lazada access token has an expired date, you may want to set `lazada:refresh-token` on scheduler and run it before it expires to refresh the access token. Otherwise, you need the seller to reauthorize and generate a new access token.

#### Token Duration

[](#token-duration)

Live

- Access token: 30 days
- Refresh token: 180 days

Testing

- Access token: 7 days
- Refresh token: 30 days

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Raditz Farhan](https://github.com/laraditz)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance55

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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 ~3 days

Total

2

Last Release

891d ago

### Community

Maintainers

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

---

Top Contributors

[![raditzfarhan](https://avatars.githubusercontent.com/u/1203676?v=4)](https://github.com/raditzfarhan "raditzfarhan (12 commits)")

---

Tags

laraditzLazada

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[kerigard/laravel-lang-ru

Ru lang for Laravel

2116.8k](/packages/kerigard-laravel-lang-ru)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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