PHPackages                             tims/laravel-flipkart-seller-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. tims/laravel-flipkart-seller-api

ActiveLibrary

tims/laravel-flipkart-seller-api
================================

Laravel integration for the Flipkart Seller API PHP SDK (tims/flipkart-seller-api-php)

v1.0.0(1mo ago)05↓75%MITPHPPHP ^8.3

Since Jul 14Pushed 1mo agoCompare

[ Source](https://github.com/timslabs/laravel-flipkart-seller-api)[ Packagist](https://packagist.org/packages/tims/laravel-flipkart-seller-api)[ RSS](/packages/tims-laravel-flipkart-seller-api/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (9)Versions (2)Used By (0)

laravel-flipkart-seller-api
===========================

[](#laravel-flipkart-seller-api)

Laravel integration for the Flipkart Seller API PHP SDK ([`tims/flipkart-seller-api-php`](https://packagist.org/packages/tims/flipkart-seller-api-php)).

Why this package?
-----------------

[](#why-this-package)

`tims/flipkart-seller-api-php` is the API client. This package adds the Laravel layer around it:

- Config and environment-based credentials
- Single-seller and multi-seller credential storage
- Access-token caching via Laravel Cache
- OAuth helpers for third-party authorization-code flow
- HTTP retries for 429 and transient 5xx responses
- Service-container bindings and a `FlipkartSellerApi` facade
- Test fakes via `FlipkartSellerFake`

You continue to call official `Flipkart\SellerApi\Api\...` classes (or `FlipkartSellerClient`); this package configures and supports them in Laravel.

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

[](#requirements)

- PHP 8.3+
- Laravel 10, 11, or 12

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

[](#installation)

```
composer require tims/laravel-flipkart-seller-api
```

Publish the config:

```
php artisan vendor:publish --tag=flipkart-seller-api-config
```

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

[](#configuration)

Add these to your `.env`:

```
FLIPKART_SELLER_INSTALLATION_TYPE=single

FLIPKART_SELLER_CLIENT_ID=
FLIPKART_SELLER_CLIENT_SECRET=

# PROD or SANDBOX
FLIPKART_SELLER_ENVIRONMENT=SANDBOX

# Optional (third-party OAuth)
FLIPKART_SELLER_REDIRECT_URI=https://your-app.test/flipkart/callback

# Token cache (enabled by default)
FLIPKART_SELLER_TOKEN_CACHE=true

# Retries for 429 / 5xx (enabled by default)
FLIPKART_SELLER_RETRY_ENABLED=true
FLIPKART_SELLER_RETRY_MAX_ATTEMPTS=3
FLIPKART_SELLER_RETRY_BASE_DELAY_MS=500
```

Single-seller mode
------------------

[](#single-seller-mode)

Type-hint `FlipkartSellerManager` or use the facade:

```
use Flipkart\SellerApi\Api\ListingsCommonV3Api;
use Tims\FlipkartSellerApi\Facades\FlipkartSellerApi;
use Tims\FlipkartSellerApi\FlipkartSellerManager;

public function index(FlipkartSellerManager $flipkart)
{
    $client = $flipkart->client();
    $listings = $client->listingsCommonV3()->getListings('SKU1,SKU2');

    return response()->json($listings);
}

// Or build an official API class directly:
$api = FlipkartSellerApi::make(ListingsCommonV3Api::class);
$result = $api->getListings('SKU1,SKU2');
```

In single-seller mode you can also resolve `Flipkart\SellerApi\FlipkartSellerClient` and `Flipkart\SellerApi\ApiClient` from the container.

Multi-seller mode
-----------------

[](#multi-seller-mode)

1. Set `FLIPKART_SELLER_INSTALLATION_TYPE=multi` (or `installation_type` in config).
2. Publish and run migrations:

```
php artisan vendor:publish --tag=flipkart-seller-api-multi-seller
php artisan migrate
```

3. Store sellers and credentials:

```
use Tims\FlipkartSellerApi\Models\Credentials;
use Tims\FlipkartSellerApi\Models\Seller;

$seller = Seller::create(['name' => 'My Seller']);

$credentials = Credentials::create([
    'seller_id' => $seller->id,
    'environment' => 'SANDBOX',
    // Optional when using shared app credentials from .env
    'client_id' => null,
    'client_secret' => null,
    // Or store a token from OAuth (preferred for third-party apps)
    'access_token' => '…',
    'access_token_expires_at' => now()->addSeconds(5184000),
]);
```

4. Build clients from a credentials row:

```
use Flipkart\SellerApi\Api\OrdersV2Api;

$api = $credentials->make(OrdersV2Api::class);
$result = $api->searchOrderItemRequest([/* … */]);

// Or the high-level client:
$client = $credentials->client();
$shipments = $client->shipmentV3()->searchPreDispatchShipmentGet();
```

`client_id` / `client_secret` fall back to the single-seller env values when left null. Secrets and access tokens are stored encrypted.

OAuth (third-party apps)
------------------------

[](#oauth-third-party-apps)

```
use Tims\FlipkartSellerApi\OAuth;

$oauth = OAuth::fromConfig();

$authorizeUrl = $oauth->getAuthorizationUri(state: $state);

// After Flipkart redirects back with code + state:
$payload = $oauth->getAccessToken(
    authorizationCode: $request->query('code'),
    state: $request->query('state'),
);

// Store $payload['access_token'] (and expires_in) on Credentials
```

Retries
-------

[](#retries)

HTTP retries for 429 / 5xx / connection errors are enabled by default. Disable globally via config or per client:

```
$api = FlipkartSellerApi::make(ListingsCommonV3Api::class, options: ['retry' => false]);
```

Testing
-------

[](#testing)

```
use Flipkart\SellerApi\Api\ListingsCommonV3Api;
use Tims\FlipkartSellerApi\Facades\FlipkartSellerApi;
use Tims\FlipkartSellerApi\Testing\FlipkartSellerFake;

$fake = FlipkartSellerFake::start();
$fake->mock(ListingsCommonV3Api::class, function ($api) {
    $api->shouldReceive('getListings')->andReturn(['items' => []]);
});

$result = FlipkartSellerApi::make(ListingsCommonV3Api::class)->getListings('SKU1');
```

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b9572b2d9e20e57d4cfd779f3f5734ae78d1e78651b4352c98c488c40020fc7?d=identicon)[MrHitss](/maintainers/MrHitss)

---

Top Contributors

[![MrHitss](https://avatars.githubusercontent.com/u/41452196?v=4)](https://github.com/MrHitss "MrHitss (1 commits)")[![timslabs](https://avatars.githubusercontent.com/u/102379998?v=4)](https://github.com/timslabs "timslabs (1 commits)")

---

Tags

laravelsdkecommercemarketplaceflipkartseller-api

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/tims-laravel-flipkart-seller-api/health.svg)

```
[![Health](https://phpackages.com/badges/tims-laravel-flipkart-seller-api/health.svg)](https://phpackages.com/packages/tims-laravel-flipkart-seller-api)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

89313.5M195](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

1.0k2.5M152](/packages/roots-acorn)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k161.4k2](/packages/mike-bronner-laravel-model-caching)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)[flarum/core

Delightfully simple forum software.

271.5M2.6k](/packages/flarum-core)

PHPackages © 2026

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