PHPackages                             arfan-vaival/cartzy-wheelify - 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. arfan-vaival/cartzy-wheelify

ActiveLibrary[API Development](/categories/api)

arfan-vaival/cartzy-wheelify
============================

PHP SDK for wheelify Cartzy API

1.0.1(5y ago)02Apache-2.0PHPPHP &gt;=7.1

Since Apr 14Pushed 5y ago1 watchersCompare

[ Source](https://github.com/arfan-vaival/cartzy-wheelify)[ Packagist](https://packagist.org/packages/arfan-vaival/cartzy-wheelify)[ Docs](https://github.com/arfan-vaival/cartzy-wheelify)[ RSS](/packages/arfan-vaival-cartzy-wheelify/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (2)Used By (0)

PHP Cartzy SDK
==============

[](#php-cartzy-sdk)

PHPCartzy is a simple SDK implementation of Cartzy API. It helps accessing the API in an object oriented way.

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

[](#installation)

Install with Composer

```
composer require arfan-vaival/cartzy-wheelify
```

### Requirements

[](#requirements)

PHPCartzy uses curl extension for handling http calls. So you need to have the curl extension installed and enabled with PHP.

> However if you prefer to use any other available package library for handling HTTP calls, you can easily do so by modifying 1 line in each of the `get()`, `post()`, `put()`, `delete()` methods in `PHPCartzy\HttpRequestJson` class.

Usage
-----

[](#usage)

You can use PHPCartzy in a pretty simple object oriented way.

#### Configure CartzySDK

[](#configure-cartzysdk)

If you are using your own private API, provide the ApiKey and Password.

```
$config = array(
    'ShopUrl' => 'yourshop.cartzy.com',
    'ApiKey' => '***YOUR-PRIVATE-API-KEY***',
    'Password' => '***YOUR-PRIVATE-API-PASSWORD***',
);

PHPCartzy\CartzySDK::config($config);
```

For Third party apps, use the permanent access token.

```
$config = array(
    'ShopUrl' => 'yourshop.cartzy.com',
    'AccessToken' => '***ACCESS-TOKEN-FOR-THIRD-PARTY-APP***',
);

PHPCartzy\CartzySDK::config($config);
```

##### How to get the permanent access token for a shop?

[](#how-to-get-the-permanent-access-token-for-a-shop)

There is a AuthHelper class to help you getting the permanent access token from the shop using oAuth.

1. First, you need to configure the SDK with additional parameter SharedSecret

```
$config = array(
    'ShopUrl' => 'yourshop.cartzy.com',
    'ApiKey' => '***YOUR-PRIVATE-API-KEY***',
    'SharedSecret' => '***YOUR-SHARED-SECRET***',
);

PHPCartzy\CartzySDK::config($config);
```

2. Create the authentication request

> The redirect url must be white listed from your app admin as one of **Application Redirect URLs**.

```
//your_authorize_url.php
$scopes = 'read_products,write_products,read_script_tags,write_script_tags';
//This is also valid
//$scopes = array('read_products','write_products','read_script_tags', 'write_script_tags');
$redirectUrl = 'https://yourappurl.com/your_redirect_url.php';

\PHPCartzy\AuthHelper::createAuthRequest($scopes, $redirectUrl);
```

> If you want the function to return the authentication url instead of auto-redirecting, you can set the argument `$return` (5th argument) to `true`.

```
\PHPCartzy\AuthHelper::createAuthRequest($scopes, $redirectUrl, null, null, true);
```

3. Get the access token when redirected back to the `$redirectUrl` after app authorization.

```
//your_redirect_url.php
PHPCartzy\CartzySDK::config($config);
$accessToken = \PHPCartzy\AuthHelper::getAccessToken();
//Now store it in database or somewhere else
```

> You can use the same page for creating the request and getting the access token (redirect url). In that case just skip the 2nd parameter `$redirectUrl` while calling `createAuthRequest()` method. The AuthHelper class will do the rest for you.

```
//your_authorize_and_redirect_url.php
PHPCartzy\CartzySDK::config($config);
$accessToken = \PHPCartzy\AuthHelper::createAuthRequest($scopes);
//Now store it in database or somewhere else
```

#### Get the CartzySDK Object

[](#get-the-cartzysdk-object)

```
$Cartzy = new PHPCartzy\CartzySDK;
```

You can provide the configuration as a parameter while instantiating the object (if you didn't configure already by calling `config()` method)

```
$Cartzy = new PHPCartzy\CartzySDK($config);
```

#### Discount Code

[](#discount-code)

You can get list of discount codes created in store admin.

```
$config = array(
    'ClientID' => '***CLIENT-ID-FOR-THIRD-PARTY-APP***',
    'ShopUrl' => 'yourshop.cartzy.com',
    'AccessToken' => '***ACCESS-TOKEN-FOR-THIRD-PARTY-APP***',
);

PHPCartzy\CartzySDK::config($config);
$discountCode = new PHPCartzy\Discount\DiscountCode();
$resp = $discountCode->get();
```

Reference
---------

[](#reference)

- [Cartzy API Reference](https://help.cartzy.com/api/reference/)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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

1854d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bab66d05b4045e518e1404d0874509f56e934c16868bc04e24a01a44d5024a9?d=identicon)[arfan-vaival](/maintainers/arfan-vaival)

---

Top Contributors

[![arfan-vaival](https://avatars.githubusercontent.com/u/82474855?v=4)](https://github.com/arfan-vaival "arfan-vaival (2 commits)")

---

Tags

phpsdkCartzy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arfan-vaival-cartzy-wheelify/health.svg)

```
[![Health](https://phpackages.com/badges/arfan-vaival-cartzy-wheelify/health.svg)](https://phpackages.com/packages/arfan-vaival-cartzy-wheelify)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)[octw/aramex

A Library to integrate with Aramex APIs

2925.2k](/packages/octw-aramex)

PHPackages © 2026

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