PHPackages                             pashkevich/loyverse-sdk - 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. pashkevich/loyverse-sdk

ActiveLibrary[API Development](/categories/api)

pashkevich/loyverse-sdk
=======================

A simple to use PHP class to work with the Loyverse API

2.0.3(5mo ago)232.3k—0%10MITPHPPHP ^7.4|^8.0CI passing

Since Dec 16Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/siarheipashkevich/loyverse-sdk)[ Packagist](https://packagist.org/packages/pashkevich/loyverse-sdk)[ Docs](https://github.com/siarheipashkevich/loyverse-sdk)[ RSS](/packages/pashkevich-loyverse-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (34)Used By (0)

Loyverse SDK
============

[](#loyverse-sdk)

[![Build Status](https://github.com/siarheipashkevich/loyverse-sdk/workflows/tests/badge.svg)](https://github.com/siarheipashkevich/loyverse-sdk/actions)[![Total Downloads](https://camo.githubusercontent.com/410126847b4110d97dcccfd946b08ff198a2e5153858815f23e6874537cc1fe4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706173686b65766963682f6c6f7976657273652d73646b)](https://packagist.org/packages/pashkevich/loyverse-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/dbc0cd1624a02a44a795f13b6c7fe653efa8ab79a2528746163514aea3f9103a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706173686b65766963682f6c6f7976657273652d73646b)](https://packagist.org/packages/pashkevich/loyverse-sdk)[![License](https://camo.githubusercontent.com/e147a83827377bdd7676e1be2c981c2051437dcb09d9024ddc2c75ee74ea29b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f706173686b65766963682f6c6f7976657273652d73646b)](https://packagist.org/packages/pashkevich/loyverse-sdk)

To work with this package, firstly you **must** have a [Loyverse](https://loyverse.com) account, and secondly you must create an API token through [Loyverse](https://loyverse.com) itself.

- [Documentation](#documentation)
    - [Installation](#installation)
    - [Basic Usage](#basic-usage)
    - [Managing Categories](#managing-categories)
    - [Managing Customers](#managing-customers)
    - [Managing Discounts](#managing-discounts)
    - [Managing Employees](#managing-employees)
    - [Managing Inventory](#managing-inventory)
    - [Managing Items](#managing-items)
    - [Managing Merchants](#managing-merchants)
    - [Managing Modifiers](#managing-modifiers)
    - [Managing Payment Types](#managing-payment-types)
    - [Managing Pos Devices](#managing-pos-devices)
    - [Managing Receipts](#managing-receipts)
    - [Managing Shifts](#managing-shifts)
    - [Managing Stores](#managing-stores)
    - [Managing Suppliers](#managing-suppliers)
    - [Managing Taxes](#managing-taxes)
    - [Managing Variants](#managing-variants)
    - [Managing Webhooks](#managing-webhooks)
- [Testing](#testing)
- [Contributing](#contributing)
- [Security Vulnerabilities](#security)
- [Credits](#credits)
- [License](#license)

Documentation
-------------

[](#documentation)

### Installation

[](#installation)

To install the SDK in your project you need to require the package via composer:

```
composer require pashkevich/loyverse-sdk
```

### Basic Usage

[](#basic-usage)

You can create an instance of the SDK like so:

```
$loyverse = new Pashkevich\Loyverse\Loyverse(PERSONAL_ACCESS_TOKEN_HERE);
```

Using the `Loyverse` instance you may perform multiple actions as well as retrieve the different resources Loyverse's API provides:

```
$categories = $loyverse->categories();
```

This will give you an array of categories that you have access to, where each category is represented by an instance of `Pashkevich\Loyverse\Resources\Category`, this instance has multiple public properties like `$id`, `$name`, `$color`, and others.

You may also retrieve a single category using:

```
$category = $loyverse->category(CATEGORY_ID_HERE);
```

On multiple actions supported by this SDK you may need to pass some parameters, for example when creating a new category:

```
$category = $loyverse->createCategory([
    'name' => 'Fruits',
    'color' => 'ORANGE',
]);
```

These parameters will be used in the POST request sent to Loyverse servers, you can find more information about the parameters needed for each action on [Loyverse's official API documentation](https://developer.loyverse.com/docs).

You can also set the desired timeout value:

```
$loyverse->setTimeout(120)->createCategory(array $data);
```

### Managing Categories

[](#managing-categories)

```
$loyverse->categories(array $parameters);
$loyverse->category(string $categoryId);
$loyverse->createCategory(array $data);
$loyverse->deleteCategory(string $categoryId);
```

On a `Category` instance you may also call:

```
$category->update(array $data);
$category->delete();
```

### Managing Customers

[](#managing-customers)

```
$loyverse->customers(array $parameters);
$loyverse->customer(string $customerId);
$loyverse->createCustomer(array $data);
$loyverse->deleteCustomer(string $customerId);
```

On a `Customer` instance you may also call:

```
$customer->update(array $data);
$customer->delete();
```

### Managing Discounts

[](#managing-discounts)

```
$loyverse->discounts(array $parameters);
$loyverse->discount(string $discountId);
$loyverse->createDiscount(array $data);
$loyverse->deleteDiscount(string $discountId);
```

On a `Discount` instance you may also call:

```
$discount->update(array $data);
$discount->delete();
```

### Managing Employees

[](#managing-employees)

```
$loyverse->employees(array $parameters);
$loyverse->employee(string $employeeId);
```

### Managing Inventory

[](#managing-inventory)

```
$loyverse->inventory(array $parameters);
$loyverse->updateInventory(array $data);
```

### Managing Items

[](#managing-items)

```
$loyverse->items(array $parameters);
$loyverse->item(string $itemId);
$loyverse->createItem(array $data);
$loyverse->deleteItem(string $itemId);
```

On a `Item` instance you may also call:

```
$item->update(array $data);
$item->delete();
```

### Managing Merchants

[](#managing-merchants)

```
$loyverse->merchant();
```

### Managing Modifiers

[](#managing-modifiers)

```
$loyverse->modifiers(array $parameters);
$loyverse->modifier(string $modifierId);
$loyverse->createModifier(array $data);
$loyverse->deleteModifier(string $modifierId);
```

On a `Modifier` instance you may also call:

```
$modifier->update(array $data);
$modifier->delete();
```

### Managing Payment Types

[](#managing-payment-types)

```
$loyverse->paymentTypes(array $parameters);
$loyverse->paymentType(string $paymentTypeId);
```

### Managing Pos Devices

[](#managing-pos-devices)

```
$loyverse->posDevices(array $parameters);
$loyverse->posDevice(string $posDeviceId);
$loyverse->createPosDevice(array $data);
$loyverse->deletePosDevice(string $posDeviceId);
```

On a `PosDevice` instance you may also call:

```
$posDevice->update(array $data);
$posDevice->delete();
```

### Managing Receipts

[](#managing-receipts)

```
$loyverse->receipts(array $parameters);
$loyverse->receipt(string $receiptNumber);
$loyverse->createReceipt(array $data);
$loyverse->createReceiptRefund(string $receiptNumber, array $data);
```

On a `Receipt` instance you may also call:

```
$receipt->refund(array $data);
```

### Managing Shifts

[](#managing-shifts)

```
$loyverse->shifts(array $parameters);
$loyverse->shift(string $shiftId);
```

### Managing Stores

[](#managing-stores)

```
$loyverse->stores(array $parameters);
$loyverse->store(string $storeId);
```

### Managing Suppliers

[](#managing-suppliers)

```
$loyverse->suppliers(array $parameters);
$loyverse->supplier(string $supplierId);
$loyverse->createSupplier(array $data);
$loyverse->deleteSupplier(string $supplierId);
```

On a `Supplier` instance you may also call:

```
$supplier->update(array $data);
$supplier->delete();
```

### Managing Taxes

[](#managing-taxes)

```
$loyverse->taxes(array $parameters);
$loyverse->tax(string $taxId);
$loyverse->createTax(array $data);
$loyverse->deleteTax(string $taxId);
```

On a `Tax` instance you may also call:

```
$tax->update(array $data);
$tax->delete();
```

### Managing Variants

[](#managing-variants)

```
$loyverse->variants(array $parameters);
$loyverse->variant(string $variantId);
$loyverse->createVariant(array $data);
$loyverse->deleteVariant(string $variantId);
```

On a `Variant` instance you may also call:

```
$variant->update(array $data);
$variant->delete();
```

### Managing Webhooks

[](#managing-webhooks)

```
$loyverse->webhooks(array $parameters);
$loyverse->webhook(string $webhookId);
$loyverse->createWebhook(array $data);
$loyverse->deleteWebhook(string $webhookId);
```

On a `Webhook` instance you may also call:

```
$webhook->update(array $data);
$webhook->delete();
```

### Testing

[](#testing)

```
composer test
```

### Contributing

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

### Credits

[](#credits)

- [Sergey Pashkevich](https://github.com/siarheipashkevich)

License
-------

[](#license)

Loyverse SDK is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance72

Regular maintenance activity

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~57 days

Recently: every ~95 days

Total

33

Last Release

159d ago

Major Versions

0.2.4 → 1.0.02023-12-02

1.0.2 → 2.0.02025-02-22

PHP version history (3 changes)0.0.1PHP ^7.4

0.0.6PHP ^7.4|^8.0

0.1.6PHP ^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/60492194b3ab1abbdfe455d5f5182d25b9af7057b48e5f3b80fd24e8c3c9dc3e?d=identicon)[siarheipashkevich](/maintainers/siarheipashkevich)

---

Top Contributors

[![siarheipashkevich](https://avatars.githubusercontent.com/u/7753600?v=4)](https://github.com/siarheipashkevich "siarheipashkevich (68 commits)")[![francescolovecchio](https://avatars.githubusercontent.com/u/20396020?v=4)](https://github.com/francescolovecchio "francescolovecchio (3 commits)")

---

Tags

loyverseloyverse-phployverse-php-sdkloyverse-sdkloyverse-sdk-phpphpsdk-phployverse-sdkloyverseloyverse-apiloyverse-php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pashkevich-loyverse-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/pashkevich-loyverse-sdk/health.svg)](https://phpackages.com/packages/pashkevich-loyverse-sdk)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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