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

ActiveLibrary

payrex/payrex-php
=================

PayRex PHP Library

v1.8.3(2mo ago)329.0k↓13.1%1MITPHPPHP &gt;=5.6.0

Since May 22Pushed 2mo ago3 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (27)Used By (0)

PayRex PHP
==========

[](#payrex-php)

PayRex PHP library provides PHP applications an easy access to the PayRex API. Explore various PHP classes that represents PayRex API resources on object instantiation.

Check [example.php](https://github.com/payrexhq/payrex-php/blob/development/example.php) see usage examples.

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

[](#requirements)

PHP 5.6.0 and later.

Composer
--------

[](#composer)

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

```
composer require payrex/payrex-php
```

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

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

Manual Installation
-------------------

[](#manual-installation)

If you prefer to manually install the library instead of using composer, you can download the [latest release](https://github.com/payrexhq/payrex-php/releases). Then, to use the bindings, include the `initialize.php` file.

```
require_once('/path/to/payrex-php/initialize.php');
```

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

[](#dependencies)

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

- [`curl`](https://secure.php.net/manual/en/book.curl.php)
- [`json`](https://secure.php.net/manual/en/book.json.php)
- [`mbstring`](https://www.php.net/manual/en/book.mbstring.php)

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

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

[](#getting-started)

Simple usage looks like:

```
$client = new \Payrex\PayrexClient('Your PayRex secret api key');
$paymentIntent = $client->paymentIntents->create([
    'amount' => 10000,
    'currency' => 'PHP',
    'payment_methods' => ['card']
]);

echo $paymentIntent->id;
```

Handle errors
-------------

[](#handle-errors)

```
try {
    $client = new \Payrex\PayrexClient('Your PayRex secret api key');
    $paymentIntent = $client->paymentIntents->create([
        'amount' => 10000,
        'currency' => 'PHP',
        'payment_methods' => ['card']
    ]);
} catch(\Payrex\Exceptions\InvalidRequestException $e) {
   print "";
   print_r($e->getError());
   print "";
}
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance85

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.9% 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 ~27 days

Recently: every ~64 days

Total

25

Last Release

78d ago

Major Versions

v0.1.5 → v1.0.02024-09-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b5ddea4b55a34ba0d873b869a46ea70d018c157a03f3d3e885c4f11bcc66052?d=identicon)[jaimehing-payrex](/maintainers/jaimehing-payrex)

---

Top Contributors

[![jaimehing](https://avatars.githubusercontent.com/u/6761602?v=4)](https://github.com/jaimehing "jaimehing (37 commits)")[![josephisleta](https://avatars.githubusercontent.com/u/8372120?v=4)](https://github.com/josephisleta "josephisleta (21 commits)")[![bongolan](https://avatars.githubusercontent.com/u/5474792?v=4)](https://github.com/bongolan "bongolan (9 commits)")[![kebscaballas](https://avatars.githubusercontent.com/u/22389847?v=4)](https://github.com/kebscaballas "kebscaballas (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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