PHPackages                             avify/avify-php-client - 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. avify/avify-php-client

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

avify/avify-php-client
======================

Avify PHP Client Library

1.0.2(4y ago)113MITPHPPHP &gt;=5.6.0

Since Jan 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/avify-com/avify-php-client)[ Packagist](https://packagist.org/packages/avify/avify-php-client)[ RSS](/packages/avify-avify-php-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (8)Used By (0)

Avify PHP Client Library
========================

[](#avify-php-client-library)

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

[](#requirements)

PHP 5.6.0 and later.

Composer
--------

[](#composer)

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

```
$ composer require avify/avify-php-client
```

To use the bindings, use Composer's autoload:

```
require __DIR__ . '/vendor/autoload.php';
```

Usage
-----

[](#usage)

The Avify PHP Client constructor accepts the following parameters:

- **mode:** `'sandbox'` or `'production'`.
- **version:** `'v1'`.
- **api\_key**: The API key provided by Avify.

```
use App\Avify;

$avify = new Avify(
    'sandbox',
    'v1',
    ' ** your api key here ** '
);

$paymentData = [
    "amount" => 500.00, // It must be a float value with a maximum of 2 decimal.
    "currency" => "USD",
    "description" => "Description",
    "orderReference" => "ref-123",
    "card" => [
        "cardHolder" => "John Doe",
        "cardNumber" => "4242424242424242",
        "cvc" => 123,
        "expMonth" => 12,
        "expYear" => 2028
    ],
    "customerId" => "123456789",
    "customer" => [
        "firstName" => "John",
        "lastName" => "Doe",
        "email" => "johndoe@test.com",
        "company" => "Best Company",
        "shippingAddress" => [
            "addressLine1" => "My address line 1",
            "addressLine2" => "My address line 2",
            "country" => "A valid country",
            "state" => "A valid state",
            "district" => "A valid district",
            "city" => "A valid city",
            "postCode" => "10512",
            "geoLat" => 19.087,
            "geoLon" => 10.246,
            "label" => "Work"
        ],
        "billingAddress" => [
            "addressLine1" => "My address line 1",
            "addressLine2" => "My address line 2",
            "country" => "A valid country",
            "state" => "A valid state",
            "district" => "A valid district",
            "city" => "A valid city",
            "postCode" => "10512",
            "geoLat" => 19.087,
            "geoLon" => 10.246,
            "label" => "Work"
        ],
    ],
    "meta" => ["orderId" => "ord-1234"]
];
$storeId = 25;
$checkout = $avify->process_payment($paymentData, $storeId);
```

Internationalization
--------------------

[](#internationalization)

If you want to set a custom locale and show messages in a specific language, you can do so using the `set_locale` method:

```
// Language and country
$avify->set_locale('es_CR');

// Or you can directly specify the language
$avify->set_locale('es');
```

### Available languages

[](#available-languages)

At the moment we only support Spanish ('es') and English ('en').

**Note:** API's locale is English by default.

TODO
----

[](#todo)

- Improve README.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~38 days

Total

3

Last Release

1473d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b638a30e9f8c4b1db6be200447d9167192dbc0de854971402373d74478165ec?d=identicon)[avify](/maintainers/avify)

---

Top Contributors

[![JuanEscobar06](https://avatars.githubusercontent.com/u/77854941?v=4)](https://github.com/JuanEscobar06 "JuanEscobar06 (6 commits)")[![juanpre77](https://avatars.githubusercontent.com/u/94854477?v=4)](https://github.com/juanpre77 "juanpre77 (6 commits)")

### Embed Badge

![Health badge](/badges/avify-avify-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/avify-avify-php-client/health.svg)](https://phpackages.com/packages/avify-avify-php-client)
```

###  Alternatives

[matt-daneshvar/laravel-survey

Create surveys inside your Laravel app

28770.3k](/packages/matt-daneshvar-laravel-survey)[stecman/composer-bash-completion-plugin

BASH/ZSH auto-complete plugin for Composer

7910.3k](/packages/stecman-composer-bash-completion-plugin)

PHPackages © 2026

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