PHPackages                             smartbuy/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. smartbuy/api

ActiveLibrary[API Development](/categories/api)

smartbuy/api
============

SmartBuy api library

1.1.3(7y ago)020PHPPHP &gt;=5.3.0

Since Jan 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/SmartBuyLV/api)[ Packagist](https://packagist.org/packages/smartbuy/api)[ RSS](/packages/smartbuy-api/feed)WikiDiscussions master Synced 3d ago

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

smartbuy-api
============

[](#smartbuy-api)

A PHP wrapper around the SmartBuy API

Install
-------

[](#install)

Install  and run the following command:

```
php composer.phar require smartbuy/api

```

Examples
--------

[](#examples)

#### Methods

[](#methods)

There are 2 common methods to communicate with api:

Checks if have query parameter with affiliate ID and sets cookie

```
$api = new Smartbuy\Api\Api($accessToken);
$api->init();
```

Register new order

```
$products = [
    [
        'title' => 'Product #1',
        'price' => 10,
        'quantity' => 1
    ],
    [
        'title' => 'Product #2',
        'price' => 4,
        'quantity' => 2,
        'rate' => 'SB1'
    ]
];

$api = new Smartbuy\Api\Api($accessToken);
$api->orderRegister($orderUniqueNumber, $products);
```

Cancel existing order

```
$api = new Smartbuy\Api\Api($accessToken);
$api->orderCancel($orderUniqueNumber);
```

Delete existing order

```
$api = new Smartbuy\Api\Api($accessToken);
$api->orderDelete($orderUniqueNumber);
```

*DEPRECATED* Register order (Executes only if have detected affiliate ID)

```
$api = new Smartbuy\Api\Api($accessToken);
$api->registerOrder($orderUniqueNumber, $fullAmount, $rateId); // RateId is optional
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 72% 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 ~24 days

Recently: every ~35 days

Total

9

Last Release

2852d ago

PHP version history (3 changes)1.0.0PHP &gt;=5.3.0

1.0.2PHP &gt;=5.4.0

1.0.3PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/31b6541b41ef056e51eb0c1de7f0e8bfb8348fc547388817f16f911761226a7a?d=identicon)[SmartBuyLV](/maintainers/SmartBuyLV)

---

Top Contributors

[![marislazda](https://avatars.githubusercontent.com/u/3876309?v=4)](https://github.com/marislazda "marislazda (18 commits)")[![SmartBuyLV](https://avatars.githubusercontent.com/u/35411494?v=4)](https://github.com/SmartBuyLV "SmartBuyLV (7 commits)")

---

Tags

apismartbuy

### Embed Badge

![Health badge](/badges/smartbuy-api/health.svg)

```
[![Health](https://phpackages.com/badges/smartbuy-api/health.svg)](https://phpackages.com/packages/smartbuy-api)
```

###  Alternatives

[corsinvest/cv4pve-api-php

Corsinvest Proxmox VE Client API PHP

801.4M](/packages/corsinvest-cv4pve-api-php)[zzantares/proxmoxve

A simple PHP 5.5+ Proxmox API client.

17761.8k4](/packages/zzantares-proxmoxve)[jiririedl/php-sendy

PHP class for using sendy API

3053.2k](/packages/jiririedl-php-sendy)[platforg/adobe-connect

Provides a PHP Client to interact with the Adobe Connect's API

1510.1k2](/packages/platforg-adobe-connect)[armorpayments/armorpayments-php

A PHP client library for interacting with the Armor Payments API

153.9k](/packages/armorpayments-armorpayments-php)

PHPackages © 2026

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