PHPackages                             muhanz/shoapi - 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. muhanz/shoapi

ActiveLibrary[API Development](/categories/api)

muhanz/shoapi
=============

Laravel Shopee Open API SDK

v1.0.1(2y ago)33272—0%5[1 issues](https://github.com/mu-hanz/shoapi/issues)MITPHPPHP ^8.0

Since Oct 13Pushed 2y ago3 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (5)Used By (0)

ShoAPI - Laravel Shopee API SDK (V2)
====================================

[](#shoapi---laravel-shopee-api-sdk-v2)

[![Latest Stable Version](https://camo.githubusercontent.com/3b856dbb8f0f0bb2cc7a7514963808f2b48c23e719c1684fe78c6c49f4669a83/687474703a2f2f706f7365722e707567782e6f72672f6d7568616e7a2f73686f6170692f763f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muhanz/shoapi)[![Total Downloads](https://camo.githubusercontent.com/b6f096f5bc02ee75f3e22a09ee1eb1dee66ada27ddab5dfb2e9316e9fc976d8e/687474703a2f2f706f7365722e707567782e6f72672f6d7568616e7a2f73686f6170692f646f776e6c6f6164733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muhanz/shoapi)[![Latest Unstable Version](https://camo.githubusercontent.com/ccfd89371f9be62d1bc34ebe989f1fafddfe6c2bd8a5017f5d9b89c0c075464e/687474703a2f2f706f7365722e707567782e6f72672f6d7568616e7a2f73686f6170692f762f756e737461626c653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muhanz/shoapi)[![License](https://camo.githubusercontent.com/00fbd73b3b8f95a01871272f4b1b63bb15a201c5aa7b88d4847f09ef1f346a90/687474703a2f2f706f7365722e707567782e6f72672f6d7568616e7a2f73686f6170692f6c6963656e73653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muhanz/shoapi)[![PHP Version Require](https://camo.githubusercontent.com/9c4d6dac332f54b77781f7d35bfb5b4afcbd3489f0107a89e2d316721e5c5fde/687474703a2f2f706f7365722e707567782e6f72672f6d7568616e7a2f73686f6170692f726571756972652f7068703f7374796c653d666c61742d737175617265)](https://packagist.org/packages/muhanz/shoapi)[![StyleCI](https://camo.githubusercontent.com/33858a8289193d3e2c2cc200bb3fa81476e0db19a1b6a3cf3c366544f9dcd471/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3730343539323837312f736869656c643f6272616e63683d616e616c797369732d365676337257)](https://github.styleci.io/repos/704592871?branch=analysis-6Vv3rW)

[![Laravel Shopee API SDK (V2)](https://camo.githubusercontent.com/0f8f943d1cf4be9cd0f0190a22ba273f00e3a983e5ec99dc4753584d349f640e/68747470733a2f2f6d7568616e7a2e6d792e69642f53686f4150492e737667)](https://camo.githubusercontent.com/0f8f943d1cf4be9cd0f0190a22ba273f00e3a983e5ec99dc4753584d349f640e/68747470733a2f2f6d7568616e7a2e6d792e69642f53686f4150492e737667)

This is a Unofficial Shopee PHP Client for Laravel 9|10 and currently supported **API V2**

> ShoAPi lets you develop **Shopee Open API** in Laravel. ShoAPi is an HTTP-based interface created for developers interested **Shopee Open API**. To learn more about the **Shopee Open API**, please consult the Introduction on the official [Shopee Open Platform](https://open.shopee.com/documents?module=87&type=2&id=64&version=2) site.

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

[](#installation)

Via Composer

```
$ composer require muhanz/shoapi
```

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

[](#before-start)

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

```
SHOPEE_PRODUCTION=false // Default
SHOPEE_HOST_URL='https://partner.shopeemobile.com'
SHOPEE_SANDBOX_HOST_URL='https://partner.test-stable.shopeemobile.com'
SHOPEE_CALLBACK_URL='/shopee/auth/get_access_token' // Example: for redirect after auth
SHOPEE_PARTNER_ID=
SHOPEE_PARTNER_KEY=
```

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

```
php artisan vendor:publish --provider="Muhanz\Shoapi\ShoapiServiceProvider" --tag="shoapi.config"
```

Authorization and Authentication
--------------------------------

[](#authorization-and-authentication)

```
// Add this facades on top controller
use Muhanz\Shoapi\Facades\Shoapi;

public function auth_partner()
{
    return Shoapi::call('shop')->access('auth_partner')->redirect(); // auto redirect

    // or

    return Shoapi::call('shop')->access('auth_partner')->getUrl();

    // response:
    // https://partner.test-stable.shopeemobile.com/api/v2/shop/auth_partner?partner_id=partner_idtimestamp=1697215282&sign=sign_code&redirect=redirect_url
}
```

For cancel/disconnet auth partner

```
return Shoapi::call('shop')->access('cancel_auth_partner')->redirect();
```

Get Access Token &amp; Refresh Access Token
-------------------------------------------

[](#get-access-token--refresh-access--token)

The access\_token is a dynamic token, and you need to pass access\_token to call non-public APIs. Each access\_token is valid for **4 hours** and can be used multiple times within **4 hours**. However, you need to refresh the access token by calling RefreshAccessToken before it expires in order to obtain a new access\_token.

Refresh\_token is a parameter used to refresh access\_token. Each refresh\_token is valid for **30 days**.

⚠️ Note: The access\_token and refresh\_token of each shop\_id and merchant\_id need to be saved separately.

Get Access Token:

```
// After authorization, the front-end page will redirect to the redirect URL in your authorization link:
// https://open.shopee.com/?code=xxxxxxxxxx&shop_id=xxxxxx

$params =  [
	'code'  =>  "54494572544875766********",
	'shop_id'  =>  (int)  000000,
];

$response = Shoapi::call('auth')
		->access('get_access_token')
		->shop(000000)
		->request($params)
		->response();

dd($response);
```

Get Refresh Access Token:

```
$params =  [
	'refresh_token'  =>  "527a424f54494572544875766*******",
	'shop_id'  =>  (int)  000000,
];

$response =  Shoapi::call('auth')
		->access('refresh_access_token')
		->shop(000000)
		->request($params)
		->response();

dd($response);
```

Example Response:

```
{
	api_status:"success",
	partner_id:000000,
	refresh_token:"527a424f54494572544875766*******",
	access_token:"786b4c74526e52426555616e*******",
	expire_in:14400,
	request_id:"84ec4d8971735d62dca40c0*******",
	shop_id:000000
}
```

Basic Usage
-----------

[](#basic-usage)

```
// Add this facades on top controller
use Muhanz\Shoapi\Facades\Shoapi;

public function get_shop_info()
{

	// path api: /api/v2/shop(use in call)/get_shop_info(use in access)

  return Shoapi::call('shop')
		->access('get_shop_info', )
		->shop()
		->response();
}
```

Other Example:

```
// Add this facades on top controller
use Muhanz\Shoapi\Facades\Shoapi;

public  function  get_category()
{

	$params =  [
		'language'  =>  'id'  // en
	];

	$response = Shoapi::call('product')
			->access('get_category',  )
			->shop()
			->request($params)
			->response();
	dd($response);
}
```

Example Response:

```
{
	api_status:"success",
	category_list:[
		{
			category_id:100001,
			parent_category_id:0,
			original_category_name:"Health",
			display_category_name:"Kesehatan",
			has_children:true

		}
	]
}
```

Support Methods
---------------

[](#support-methods)

Currently supported all methods exclude **GlobalProduct(CB seller only)** please open [Shopee Open Platform](https://open.shopee.com/documents/v2/v2.product.get_category?module=89&type=1)

Service *(call)*Method *(access)*Product`add_item, get_category and 35 others`✅Global Product(CB seller only)`- Not Tested`❌MediaSpace`upload_image, upload_video, etc`✅Shop`get_info_shop, get_profile, update_profile, etc`✅Merchant`get_merchant_info, get_shop_list_by_merchant, etc`✅Order`get_order_list, get_order_detail and 11 others`✅Logistics`get_shipping_parameter, get_tracking_number, and 14 others`✅First Miles`get_unbind_order_list, get_detail, etc`✅Payment`get_escrow_detail, set_shop_installment_status, etc`✅Discount`add_discount, add_discount_item, etc`✅Bundle Deal`add_bundle_deal, add_bundle_deal_item, etc`✅Add-On Deal`add_add_on_deal, add_add_on_deal_main_item, etc`✅Voucher`add_voucher, delete_voucher, etc`✅Follow Prize`add_follow_prize, delete_follow_prize, etc`✅Top Picks`get_top_picks_list, add_top_picks, etc`✅Shop Category`add_shop_category, get_shop_category_list, etc`✅Returns`get_return_detail, get_return_list, etc`✅Account Health`shop_performance, shop_penalty`✅Public`get_shops_by_partner, get_access_token,refresh_access_token, etc`✅Push`set_app_push_config, get_app_push_config`✅Documentation
-------------

[](#documentation)

Please refer to the official documentation [Shopee Open Platform](https://open.shopee.com/developer-guide/4)

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Credits
-------

[](#credits)

- [Mu Hanz](https://github.com/muhanz)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97% 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

948d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8be084739b52ffaf7f5da0acc9dff0492ecb5ed6a56dad3d69fec346e3463eb6?d=identicon)[muhanz](/maintainers/muhanz)

---

Top Contributors

[![mu-hanz](https://avatars.githubusercontent.com/u/44943686?v=4)](https://github.com/mu-hanz "mu-hanz (32 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

api-clientlaravel-packageshopeelaravelShoapiShopee API

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/muhanz-shoapi/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[flat3/lodata

OData v4.01 Producer for Laravel

96320.9k](/packages/flat3-lodata)[laravel-freelancer-nl/laravel-index-now

Alert search engines of content changes.

5212.1k](/packages/laravel-freelancer-nl-laravel-index-now)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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