A framework-independent PHP SDK for the Shopee Open Platform.
- Full coverage of the Shopee Open Platform API (Product, Order, Logistics, Payment, Ads, Livestream, and every other published API domain)
- Partner authentication, request signing, and the OAuth authorization flow
- A clean, typed HTTP client and consistent per-domain API clients
- Push Mechanism support (webhook signature verification and event parsing)
- A framework-independent Core SDK, usable in plain PHP
- Optional Laravel integration (Service Provider + Facade)
- Optional Symfony integration (Bundle + Dependency Injection)
- PHP
^8.1 - A PSR-18 HTTP client (the SDK depends on
guzzlehttp/guzzleby default)
composer require syscage/sdk-shopee-phpuse Syscage\Sdk\Shopee\Core\Http\Auth\Credentials;
$credentials = new Credentials(
partnerId: 2001887,
partnerKey: getenv('SHOPEE_PARTNER_KEY'),
apiUrl: 'https://partner.shopeemobile.com',
authUrl: 'https://open.shopee.com',
);Never hard-code your Partner Key — load it from the environment or a secrets manager.
use Syscage\Sdk\Shopee\Core\Shopee;
$shopee = new Shopee($credentials);
// 1. Send the seller to this URL to authorize your app.
$authorizationUrl = $shopee->oauth()->getAuthorizationUrl('https://your-app.test/callback');
// 2. Once the seller is redirected back with ?code=...&shop_id=..., exchange it.
$token = $shopee->oauth()->getAccessTokenForShop($code, $shopId);
// 3. Persist $token yourself, then scope the client to it for API calls.
$shopee = $shopee->withAccessToken($token);
$info = $shopee->shop()->getShopInfo();Laravel integration is included (Service Provider, container bindings, and
a Shopee Facade), auto-discovered via Composer.
See the documentation for installation and configuration.
Symfony integration is included (a Bundle and Dependency Injection extension — no static Facade, by design).
See the documentation for installation and configuration.
For installation, configuration, authentication, the full API reference, Push Mechanism, Laravel, Symfony, sandbox usage, testing, and advanced usage:
Never commit Partner Keys, Access Tokens, Refresh Tokens, or other secrets to source control.
MIT