PHPackages                             jasara/laravel-selling-partner-api - 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. jasara/laravel-selling-partner-api

ActiveLibrary[API Development](/categories/api)

jasara/laravel-selling-partner-api
==================================

 Laravel wrapper for Amazon's Selling Partner API SDK

v4.0.0(1y ago)817.9k—0%5MITPHPPHP ^8.1

Since Sep 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jasara/laravel-selling-partner-api)[ Packagist](https://packagist.org/packages/jasara/laravel-selling-partner-api)[ Docs](https://github.com/jasara/laravel-selling-partner-api)[ GitHub Sponsors](https://github.com/jasara)[ RSS](/packages/jasara-laravel-selling-partner-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (9)Used By (0)

Laravel wrapper for Amazon's Selling Partner API SDK
====================================================

[](#laravel-wrapper-for-amazons-selling-partner-api-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0cd7cbfe9c55cc4aa7bc63d64a49febc2f09c5ae5842ac944d1d067da0696e84/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61736172612f6c61726176656c2d73656c6c696e672d706172746e65722d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jasara/laravel-selling-partner-api)[![GitHub Tests Action Status](https://camo.githubusercontent.com/14caaee25aa8bde262803e7c41384aa561bb4e63cafb62ce0080db187248555a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a61736172612f6c61726176656c2d73656c6c696e672d706172746e65722d6170692f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473)](https://github.com/jasara/laravel-selling-partner-api/actions?query=workflow%3Arun-tests+branch%3Amain)[![Code coverage](https://raw.githubusercontent.com/jasara/laravel-selling-partner-api/main/.github/coverage.svg)](https://github.com/jasara/laravel-selling-partner-api)[![Total Downloads](https://camo.githubusercontent.com/34d447890b380728ac70e44b3eb0d10dc35bec6388caeac1709d72a3d105eb2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a61736172612f6c61726176656c2d73656c6c696e672d706172746e65722d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jasara/laravel-selling-partner-api)

This package is a Laravel wrapper around [Jasara's PHP SDK for Amazon's Selling Partner API](https://github.com/jasara/php-amzn-selling-partner-api).

License
-------

[](#license)

While this package has an [MIT license](LICENSE.md), the core PHP SDK package is not commercially licensed. If you are using this package commerically, please see the [licensing section](https://github.com/jasara/php-amzn-selling-partner-api#license) of the core PHP SDK package.

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

[](#installation)

You can install the package via composer:

```
composer require jasara/laravel-selling-partner-api
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Jasara\LaravelAmznSPA\LaravelAmznSPAServiceProvider" --tag="laravel-selling-partner-api-config"
```

This is the contents of the published config file:

```
return [
    'marketplace_id' => env('AMZN_SPA_MARKETPLACE_ID'),
    'application_id' => env('AMZN_SPA_APPLICATION_ID'),
    'redirect_url' => env('AMZN_SPA_REDIRECT_URL'),
    'use_test_endpoints' => env('AMZN_SPA_USE_TEST_ENDPOINTS'),
    'aws_access_key' => env('AMZN_SPA_AWS_ACCESS_KEY'),
    'aws_secret_key' => env('AMZN_SPA_AWS_SECRET_KEY'),
    'lwa_client_id' => env('AMZN_SPA_LWA_CLIENT_ID'),
    'lwa_client_secret' => env('AMZN_SPA_LWA_CLIENT_SECRET'),
];
```

Usage
-----

[](#usage)

For full usage information, see the [documentation website](https://phpspa.com/).

In this Laravel wrapper, the underlying library will be automatically configured when you set the following environment variables:

```
AMZN_SPA_MARKETPLACE_ID=ATVPDKIKX0DER
AMZN_SPA_APPLICATION_ID=amzn1.sellerapps.app.appid-1234-5678-a1b2-a1b2c3d4e5f6
AMZN_SPA_REDIRECT_URL=yourapp.com/amazon/oauth/redirect
AMZN_SPA_USE_TEST_ENDPOINTS=true
AMZN_SPA_AWS_ACCESS_KEY=AKIASECRETKEY
AMZN_SPA_AWS_SECRET_KEY=rf7x7rpjqq1tlcbbv2r9iahcmm6mluaqn8deitcl
AMZN_SPA_LWA_CLIENT_ID=17r2r9iahcmm6mlubv2r9iahcmm6mluaqnlcbbv2r9iahiahcmm6mluaqn8de
AMZN_SPA_LWA_CLIENT_SECRET=Atzr|1tlcbbv2r9iahcmm6mluaqn8d-secret

```

To call the Amazon API, first instantiate the Laravel wrapper class, passing any configuration parameters (such as client authorization tokens) into the constructor.

```
$amzn = new \Jasara\LaravelAmznSPA\LaravelAmznSPA(
    tokens: new \Jasara\AmznSPA\DataTransferObjects\AuthTokensDTO(
        access_token: $access_token, // optional if there is a refresh token
        expires_at: $expires_at, // optional, instance of CarbonImmutable
        refresh_token: $refresh_token, // optional if there is an access token, Passing in the refresh token will automatically generate a new access token when needed
    ),
    http: $http, // instance of Illuminate\Http\Client\Factory - if you would like to stub tests, you can pass in a faked HTTP instance
    grantless_token: new \Jasara\AmznSPA\DataTransferObjects\GrantlessTokenDTO(
        access_token: $access_token, // optional, a new token will be automatically generated if not passed in
        expires_at: $expires_at, // optional, instance of CarbonImmutable
    ),
    marketplace_id: $marketplace_id, // e.g. ATVPDKIKX0DER
);
```

You can then call the underlying library resources directly, such as the [Notifications resource](https://phpspa.com/docs/resources/notifications/). The response is a data transfer object adhering to the Amazon schema.

```
$amzn->notifications->getDestinations();
$destination_id = $response->payload[0]->destination_id;
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 81.5% 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 ~179 days

Recently: every ~269 days

Total

7

Last Release

610d ago

Major Versions

v1.0.3 → v2.0.02022-01-21

v2.0.0 → v3.0.02023-02-08

v3.0.0 → v4.0.02024-09-09

PHP version history (2 changes)1.0.0PHP ^8.0

v4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/787337724116dcbbddb7bb34a4bf3625e1ecbb2e0a7d80d045b5cdc52b2b37f1?d=identicon)[KeithBrink](/maintainers/KeithBrink)

---

Top Contributors

[![keithbrink](https://avatars.githubusercontent.com/u/15267205?v=4)](https://github.com/keithbrink "keithbrink (22 commits)")[![zjbarg](https://avatars.githubusercontent.com/u/26728749?v=4)](https://github.com/zjbarg "zjbarg (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

amazonlaravelmwsselling-partner-apiselling-partner-api-sdklaraveljasaralaravel-selling-partner-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jasara-laravel-selling-partner-api/health.svg)

```
[![Health](https://phpackages.com/badges/jasara-laravel-selling-partner-api/health.svg)](https://phpackages.com/packages/jasara-laravel-selling-partner-api)
```

###  Alternatives

[spatie/laravel-query-builder

Easily build Eloquent queries from API requests

4.4k26.9M220](/packages/spatie-laravel-query-builder)[essa/api-tool-kit

set of tools to build an api with laravel

52680.5k](/packages/essa-api-tool-kit)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[ryangjchandler/bearer

Minimalistic token-based authentication for Laravel API endpoints.

8129.8k](/packages/ryangjchandler-bearer)[joggapp/laravel-aws-sns

Laravel package for the SNS events by AWS

3171.8k](/packages/joggapp-laravel-aws-sns)

PHPackages © 2026

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