PHPackages                             arslaniftikhar/shopify-client - 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. arslaniftikhar/shopify-client

ActiveLibrary[API Development](/categories/api)

arslaniftikhar/shopify-client
=============================

Shopify API client for PHP

1.0(6y ago)013MITPHPPHP &gt;=5.5.0

Since May 18Pushed 6y agoCompare

[ Source](https://github.com/arslaniftikhar/shopify-client)[ Packagist](https://packagist.org/packages/arslaniftikhar/shopify-client)[ RSS](/packages/arslaniftikhar-shopify-client/feed)WikiDiscussions master Synced 2mo ago

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

Shopify PHP SDK
===============

[](#shopify-php-sdk)

A simple Shopify PHP SDK for private apps to easily interact with the Shopify API.

[Shopify API Documentation](https://docs.shopify.com/api) | [Packagist](https://packagist.org/packages/arslaniftikhar/shopify-client)

Package has following features:

- ability to easily GET, PUT, POST and DELETE resources

Setup/Installation
------------------

[](#setupinstallation)

Uses [arslaniftikhar/curl](https://packagist.org/packages/arslaniftikhar/curl). You need to include this library by running:
`composer require arslaniftikhar/curl 1.0`

### Public App

[](#public-app)

First of all, you must have set up the public app. [View documentation](https://docs.shopify.com/api/introduction/getting-started). You need an authorization URL.

```
$shopify = new Shopify($shop, $APP_API_KEY, $APP_SECRET);

$client->installURL($permissions, $redirect_uri, $auto_redirect = true);
```

At this point, the user is taken to their store to authorize the application to use their information.
If the user accepts, they are taken to the redirect URL.

```
session_start();
$shopify = new Shopify($_GET['shop'], $APP_API_KEY, $APP_SECRET);

if ($token = $client->getAccessToken()) {
    // You can save the access token to database to make the api call in future.
  $_SESSION['shopify_access_token'] = $token;
  $_SESSION['shopify_shop_domain'] = $_GET['shop'];
  // Redirect to app's dashboard URL
  header("Location: dashboard.php");
}
else {
  die('Couldn't find the access token');
}
```

It's at this point, in **dashboard.php** you could starting doing API request by setting the `access_token`.

```
session_start();
$shopify = new Shopify(, $APP_API_KEY, $APP_SECRET);
$shopify->setAccessToken($_SESSION['shopify_access_token']);

// you can get the resource by just passing the resource name.
$products = $shopify->get('products');
```

---

Methods
-------

[](#methods)

### GET

[](#get)

Get resource information from the API.

```
$shopify = new Shopify($SHOPIFY_SHOP_DOMAIN, $SHOPIFY_API_KEY, $SHOPIFY_SHARED_SECRET);
$result = $shopify->get('shop');
```

`$result` is a JSON decoded `array`:

Get product IDs by passing query params:

```
$result = $shopify->get('products', ['query' => ['fields' => 'id']]);
foreach($result->products as $product) {
  print $product->id;
}
```

### POST

[](#post)

Create new content with a POST request.

```
$data = ['product' => ['title' => 'my new product']];
$result = $shopify->post('products', $data);
```

### PUT

[](#put)

Update existing content with a given ID.

```
$data = ['product' => ['title' => 'updated product name']];
$result = $shopify->put('products/' . $product_id, $data);
```

### DELETE

[](#delete)

Easily delete resources with a given ID.

```
$shopify->delete('products/' . $product_id);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

2548d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcbbfe597a0d677570ce85cd2478670c13f577e2c0df13e0fb4db820aecea3f9?d=identicon)[arslaniftikhar](/maintainers/arslaniftikhar)

---

Top Contributors

[![arslaniftikhar](https://avatars.githubusercontent.com/u/24463261?v=4)](https://github.com/arslaniftikhar "arslaniftikhar (2 commits)")

### Embed Badge

![Health badge](/badges/arslaniftikhar-shopify-client/health.svg)

```
[![Health](https://phpackages.com/badges/arslaniftikhar-shopify-client/health.svg)](https://phpackages.com/packages/arslaniftikhar-shopify-client)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

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