PHPackages                             rebilly/client-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. [API Development](/categories/api)
4. /
5. rebilly/client-php

ActiveLibrary[API Development](/categories/api)

rebilly/client-php
==================

Rebilly PHP Client

3.1.6(6mo ago)18401.9k↑55.2%18[4 PRs](https://github.com/Rebilly/rebilly-php/pulls)MITPHPPHP ^8.0CI failing

Since Jun 14Pushed 1mo ago19 watchersCompare

[ Source](https://github.com/Rebilly/rebilly-php)[ Packagist](https://packagist.org/packages/rebilly/client-php)[ Docs](http://rebilly.com/)[ RSS](/packages/rebilly-client-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (65)Used By (0)

Rebilly SDK for PHP
===================

[](#rebilly-sdk-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3ed930d534a5406b66e0fbc2c77b3dc6a2dc3af8a91f83d9d26c748b2d26879f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726562696c6c792f636c69656e742d7068702e737667)](https://packagist.org/packages/rebilly/client-php)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/610299dce7dbcb50a0954fbc4a95a776bae9ec7af645140367b8a7864c0ed737/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726562696c6c792f636c69656e742d7068702e737667)](https://packagist.org/packages/rebilly/client-php)

The **Rebilly SDK for PHP** makes it easy for developers to access [Rebilly REST APIs](https://www.rebilly.com/catalog/all) in their PHP code.

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

[](#requirements)

- PHP 8.0+.
- CURL (verify peer requires a root certificate authority -- if you have not configured php curl to use one, and your system libs aren't linked to one, you may need to do a [manual configuration](http://stackoverflow.com/questions/17478283/paypal-access-ssl-certificate-unable-to-get-local-issuer-certificate/19149687#19149687) to use the appropriate certificate authority)

Installation
------------

[](#installation)

Warning

This package does not follow semantic versioning, so minor version updates can cause backward compatibility breaks. Updates to the package should be tested before switching versions.

Using [Composer](http://getcomposer.org/) is the recommended way to install the Rebilly SDK for PHP. To get started, you need run the Composer commands (assume you're in the project's root directory).

- Install the latest stable version of the SDK:

```
composer require rebilly/client-php
```

*You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at [getcomposer.org](http://getcomposer.org/).*

Supported Versions
------------------

[](#supported-versions)

The previous version of the SDK can be outdated and won't provide all (or the correct) specifications to communicate with the REST APIs. Only the latest version is constantly supported.

VersionSupportedDocumentation[2.x](https://github.com/Rebilly/rebilly-php/tree/v2.x)⚠️ (security fixes only)✅ [See tab PHP-SDK-2.0](https://www.rebilly.com/catalog/all)3.x✅ (current)✅ [See tab PHP](https://www.rebilly.com/catalog/all)Quick Examples
--------------

[](#quick-examples)

Create a Rebilly Client

```
use Rebilly\Sdk\Client;
use Rebilly\Sdk\Service;

// Instantiate Rebilly client.
$client = new Client([
    'baseUrl' => Client::SANDBOX_HOST,
    'organizationId' => '{organizationId}',
    'apiKey' => '{secretKey}',
]);
$service = new Service(client: $client);
```

Create a Customer

```
use Rebilly\Sdk\Exception\DataValidationException;
use Rebilly\Sdk\Model\ContactObject;
use Rebilly\Sdk\Model\Customer;

$customer = Customer::from([])
    ->setWebsiteId('{websiteId}')
    ->setPrimaryAddress(
        ContactObject::from([])
            ->setFirstName('John')
            ->setLastName('Doe'),
    );

try {
  $customer = $service->customers()->create($form);
} catch (DataValidationException $e) {
  var_dump($e->getValidationErrors());
}
```

For more see [examples directory](./examples/).

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

[](#documentation)

Read [Rebilly REST APIs documentation](https://www.rebilly.com/catalog/all) for more details.

Migration from SDK v2.x to v3.x
-------------------------------

[](#migration-from-sdk-v2x-to-v3x)

This new major version brings several new helper classes to communicate with Rebilly REST APIs and some incompatibilities that should be tested before switching SDK versions.

- Now, a `Service` class can be explicitly instantiated to make the API calls instead of using only the `Client`, as it encapsulates the API calls.
- To simplify the migration from the previous version, the `Client` object can be used to make calls to any API directly. For example, instead of instantiating a service class, one can use:

    ```
    $client->customers()->create($form);
    ```
- The namespace changed from `Rebilly\Entities` to `Rebilly\Sdk\Model`. Now, the `src` is `Rebilly\Sdk`.
- The classes are now generated by an automated process that is triggered every time a new version of the [API definitions](https://github.com/Rebilly/api-definitions) is released. It means more frequency on the SDK updates, keeping it synced with the REST APIs.

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance81

Actively maintained with recent releases

Popularity46

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 74.4% 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 ~73 days

Recently: every ~114 days

Total

58

Last Release

182d ago

Major Versions

1.0.x-dev → v2.0.1-alpha2015-08-13

2.19.0 → 3.0.0-alpha2022-09-16

v2.x-dev → 3.0.02023-10-05

PHP version history (7 changes)1.0.0PHP &gt;=5.2

1.0.5PHP &gt;=5.3

v2.0.1-alphaPHP &gt;=5.4

2.2.0PHP &gt;=5.5

2.4.0PHP &gt;=7.1

3.0.0-alphaPHP ^8.1

3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6845f3c600152997e97f19b9884f0eef20ecaa590590fe06d31c828ccb6a72b?d=identicon)[adamaltman](/maintainers/adamaltman)

---

Top Contributors

[![rebilly-machine-user](https://avatars.githubusercontent.com/u/29335184?v=4)](https://github.com/rebilly-machine-user "rebilly-machine-user (151 commits)")[![justnero](https://avatars.githubusercontent.com/u/11618962?v=4)](https://github.com/justnero "justnero (36 commits)")[![lucasxciv](https://avatars.githubusercontent.com/u/5672800?v=4)](https://github.com/lucasxciv "lucasxciv (5 commits)")[![elgouttefangeas](https://avatars.githubusercontent.com/u/185560359?v=4)](https://github.com/elgouttefangeas "elgouttefangeas (4 commits)")[![ashkarpetin](https://avatars.githubusercontent.com/u/400534?v=4)](https://github.com/ashkarpetin "ashkarpetin (3 commits)")[![owsiakl](https://avatars.githubusercontent.com/u/9623965?v=4)](https://github.com/owsiakl "owsiakl (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

payment-gatewaysubscriptionstransactionsapipayment processingsubscriptionstransactions

###  Code Quality

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69433.0M114](/packages/algolia-algoliasearch-client-php)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)

PHPackages © 2026

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