PHPackages                             up2date/flow-php-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. up2date/flow-php-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

up2date/flow-php-sdk
====================

0.4.0(2y ago)09proprietaryPHP

Since Aug 3Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Up2dateSoftware/Flow-PHP-SDK)[ Packagist](https://packagist.org/packages/up2date/flow-php-sdk)[ RSS](/packages/up2date-flow-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

Flow PHP SDK
============

[](#flow-php-sdk)

The Flow PHP library provides convenient access to the Flow API from applications written in the PHP language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses which makes it compatible with a wide range of versions of the Flow API.

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

[](#requirements)

PHP 8.0 and later.

Composer
--------

[](#composer)

You can install the sdk via [Composer](http://getcomposer.org). Run the following command:

```
composer require up2date/flow-php-sdk
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```
require_once 'vendor/autoload.php';
```

Dependencies
------------

[](#dependencies)

The bindings require the following extensions in order to work properly:

- [`curl`](https://secure.php.net/manual/en/book.curl.php), although you can use your own non-cURL client if you prefer
- [`json`](https://secure.php.net/manual/en/book.json.php)
- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.

Getting Started
---------------

[](#getting-started)

Create a Flow client with configuration:

```
Flow::setApiKey('10|x1lf89YRu4YVQEP7rHcnWA6YdHlGgl3nj7fAykGL');
Flow::setApiBase('https://flow.up2date.ro/api');
$flow = new \Up2date\FlowPhpSdk\FlowClient();
```

Customers
---------

[](#customers)

Create a customer

```
try {
    $customer = $flow->customers->create([
        'email' => 'john.doe@example.com',
        'firstName' => 'John',
        'lastName' => 'Doe',
        'countryCode' => 40,
        'phone' => '723534609'
    ]);
    echo $customer;
} catch (Up2date\FlowPhpSdk\Exception\ApiErrorException $exception) {
    echo $exception->getMessage();
}
```

Find a customer by email address

```
try {
    $customer = $flow->customers->findOne([
        'email' => 'john.doe@example.com'
    ]);
    echo $customer;
} catch (Up2date\FlowPhpSdk\Exception\ApiErrorException $exception) {
    echo $exception->getMessage();
}
```

Find a customer by phone number

```
try {
    $customer = $flow->customers->findOne([
        'phone' => '723512322'
    ]);
    echo $customer;
} catch (Up2date\FlowPhpSdk\Exception\ApiErrorException $exception) {
    echo $exception->getMessage();
}
```

Loyalty
-------

[](#loyalty)

Get the loyalty rules

```
try {
    $loyaltyRules = $flow->loyalty->getRules();
    echo $loyaltyRules;
} catch (Up2date\FlowPhpSdk\Exception\ApiErrorException $exception) {
    echo $exception->getMessage()."\n";
}
```

Add loyalty points from amount

```
try {
    $loyaltyParams = [
        'total' => 100, // Amount in the default currency
        'details' => 'Bonus points'
    ];

    $customer = $customer->addLoyaltyFromAmount($loyaltyParams);

} catch (Up2date\FlowPhpSdk\Exception\ApiErrorException $exception) {
    echo $exception->getMessage()."\n";
}
```

Remove loyalty points from amount

```
try {
    $loyaltyParams = [
        'total' => 100,
        'points' => 20,
        'details' => 'Spend points'
    ];

    $customer = $customer->removeLoyaltyFromAmount($loyaltyParams);

} catch (Up2date\FlowPhpSdk\Exception\ApiErrorException $exception) {
    echo $exception->getMessage()."\n";
}
```

Calculate loyalty points from amount

```
try {
    $params = [
        'total' => 100
    ];

    $points = $flow->loyalty->calculate($params);
    echo $points->data;

} catch (Up2date\FlowPhpSdk\Exception\ApiErrorException $exception) {
    echo $exception->getMessage()."\n";
}
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

Every ~2 days

Total

4

Last Release

1009d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d664ef1bb6b5b4fcde051cf772c723ed1ce4dee427f5fc097e19e680323f6dc?d=identicon)[up2date](/maintainers/up2date)

---

Top Contributors

[![up2marius](https://avatars.githubusercontent.com/u/6499942?v=4)](https://github.com/up2marius "up2marius (5 commits)")

### Embed Badge

![Health badge](/badges/up2date-flow-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/up2date-flow-php-sdk/health.svg)](https://phpackages.com/packages/up2date-flow-php-sdk)
```

###  Alternatives

[redot/laravel-toastify

A simple package to use toastify.js in laravel applications

109.7k](/packages/redot-laravel-toastify)

PHPackages © 2026

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