PHPackages                             abumutrust/utrust - 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. abumutrust/utrust

ActiveLibrary

abumutrust/utrust
=================

Utrust API library

v1.0.5(5y ago)07GPL-3.0-or-laterPHPPHP &gt;=5.3.0

Since Dec 9Pushed 5y agoCompare

[ Source](https://github.com/Patoreek/utrust-php)[ Packagist](https://packagist.org/packages/abumutrust/utrust)[ RSS](/packages/abumutrust-utrust/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

Utrust PHP
==========

[](#utrust-php)

[![Test Suite](https://github.com/utrustdev/utrust-php/workflows/Test%20Suite/badge.svg)](https://github.com/utrustdev/utrust-php/workflows/Test%20Suite/badge.svg)

The official PHP library for the [Utrust API](https://docs.api.utrust.com).

Minimum Requirements
--------------------

[](#minimum-requirements)

- PHP version 5.4 or above.

Install
-------

[](#install)

Install with composer:

```
composer require utrust/utrust

```

Usage
-----

[](#usage)

### API Client

[](#api-client)

Creating a new Order:

```
use AbumUtrust\ApiClient;

$utrustApi = new ApiClient('API_KEY');

$orderData = [...];
$customerData = [...];

$response = $utrustApi->createOrder($orderData, $customerData);
echo $response->attributes->redirect_url;
```

Check the full example [here](https://github.com/utrustdev/utrust-php/blob/master/examples/create_simple_order.php).

### Validations

[](#validations)

The `Validator` class can be used to check your data array before passing it to the API Client. It will throw an exception with the errors array if the validations don't pass, otherwise it will return `true`:

```
$orderIsValid = Validator::order($orderData);
$customerIsValid = Validator::customer($customerData);

if ($orderIsValid && $customerIsValid) {
    // create the order here
}
```

### Webhooks

[](#webhooks)

The `Webhook\Event` class can be used to verify an incoming event via Webhook. It will throw an exception if the event has an invalid format or invalid signature:

```
$event = new Event($payload);
$event->validateSignature($webhooksSecret);
```

Check the `examples/` directory for further details.

Contribute
----------

[](#contribute)

This library was written and is maintained by the Utrust development team. We have now opened it to the world so that the community using this library may have the chance of shaping its development.

You can contribute by simply letting us know your suggestions or any problems that you find [by opening an issue on GitHub](https://github.com/utrustdev/utrust-php/issues/new).

You can also fork the repository on GitHub and open a pull request for the `master` branch with your missing features and/or bug fixes. Please make sure the new code follows the same style and conventions as already written code. Our team is eager to welcome new contributors into the mix 😊.

### Tests

[](#tests)

When contributing with new changes, please make an effort to provide the respective tests. This is especially important when fixing any problems, as it will prevent other contributors from accidentally reintroducing the issue in the future.

Before submitting a pull request with your changes, please make sure every test passes:

```
composer test

```

When in doubt whether you caused a test to fail, check the build for `master` in [CircleCI](https://circleci.com/gh/utrustdev/utrust-php).

### Lint

[](#lint)

This project uses [PHPCodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) with PSR-2 coding stardard.

Before contributing your changes, make sure it passes on the linter:

```
composer lint

```

When in doubt whether you introduced a linter error, check the build for `master` in [CircleCI](https://circleci.com/gh/utrustdev/utrust-php).

Publish
-------

[](#publish)

We are publishing the library to [Packagist](https://packagist.org/packages/utrust/utrust). We are using [semantic versioning](https://semver.org) to keep track of package changes. To publish a new package version run the following commands:

```
git tag v1.0.0
git push origin v1.0.0

```

License
-------

[](#license)

Utrust PHP is maintained with 💜 by the Utrust development team, and is available to the public under the GNU GPLv3 license. Please see [LICENSE](https://github.com/utrustdev/utrust-php/blob/master/LICENSE) for further details.

© Utrust 2020

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% 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 ~48 days

Total

6

Last Release

2112d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/35647429?v=4)[Patrick Minda](/maintainers/Patoreek)[@Patoreek](https://github.com/Patoreek)

---

Top Contributors

[![danielmcoelho](https://avatars.githubusercontent.com/u/1558992?v=4)](https://github.com/danielmcoelho "danielmcoelho (14 commits)")[![cswiers](https://avatars.githubusercontent.com/u/61017681?v=4)](https://github.com/cswiers "cswiers (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/abumutrust-utrust/health.svg)

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

###  Alternatives

[vlucas/spot2

Simple DataMapper built on top of Doctrine DBAL

605392.8k7](/packages/vlucas-spot2)[bacula-web/bacula-web

The open source web based reporting and monitoring tool for Bacula

1537.5k](/packages/bacula-web-bacula-web)[greensms/greensms

GREENSMS API: SMS, WhatsApp, Viber, VK, Voice, Call, HLR

2629.6k](/packages/greensms-greensms)[turtledesign/royalmail-php

PHP module for interfacing with the Royal Mail shipping api : http://www.royalmail.com/corporate/services/shipping-api

2016.6k](/packages/turtledesign-royalmail-php)

PHPackages © 2026

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