PHPackages                             recurly-v2/recurly-clientv2 - 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. [Payment Processing](/categories/payments)
4. /
5. recurly-v2/recurly-clientv2

ActiveLibrary[Payment Processing](/categories/payments)

recurly-v2/recurly-clientv2
===========================

The PHP client library for the Recurly API

v2.x-dev(6y ago)01.7k[1 issues](https://github.com/hfischberg/v2Recurly-client/issues)MITPHPPHP &gt;=5.6CI failing

Since Apr 29Pushed 6y agoCompare

[ Source](https://github.com/hfischberg/v2Recurly-client)[ Packagist](https://packagist.org/packages/recurly-v2/recurly-clientv2)[ Docs](https://github.com/recurly/recurly-client-php)[ RSS](/packages/recurly-v2-recurly-clientv2/feed)WikiDiscussions v2 Synced 1mo ago

READMEChangelogDependencies (1)Versions (1)Used By (0)

Recurly PHP Client
==================

[](#recurly-php-client)

[![Build Status](https://camo.githubusercontent.com/4ca90d6c83cd9a5446018dfb238a0a32096a727e1d9ffa44a034466e8b2d4951/68747470733a2f2f7472617669732d63692e6f72672f72656375726c792f72656375726c792d636c69656e742d7068702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/recurly/recurly-client-php)

The Recurly PHP Client library is an open source library to interact with Recurly's subscription management from your PHP website. The library interacts with Recurly's [REST API](https://dev.recurly.com/docs/getting-started).

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

[](#requirements)

### cURL and OpenSSL

[](#curl-and-openssl)

The PHP library depends on PHP 5.6 (or higher, though only PHP 7.2 or newer is officially supported) and libcurl compiled with OpenSSL support. Open up a `phpinfo();` page and verify that under the curl section, there's a line that says something like:

```
libcurl/7.19.5 OpenSSL/1.0.1g zlib/1.2.3.3 libidn/1.15

```

Please ensure that your OpenSSL version supports TLS v1.2 (or higher) and that it meets [PHP's requirements for the OpenSSL cryptography extension](http://php.net/manual/en/openssl.requirements.php). Some older versions of OpenSSL will not necessarily work properly with the Recurly API. For security reasons, it is strongly encouraged to use the latest version of OpenSSL.

### Timezone

[](#timezone)

You will need to specify your server's timezone before using the Recurly PHP client. This is necessary for the library to properly handle datetime conversions. You can do this in your `php.ini` file:

```
date.timezone = 'America/Los_Angeles'
```

or in your PHP script:

```
date_default_timezone_set('America/Los_Angeles');
```

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

[](#installation)

### Composer

[](#composer)

If you're using [Composer](http://getcomposer.org/), you can simply add a dependency on `recurly/recurly-client` to your project's `composer.json` file.

```
{
    "require": {
        "recurly/recurly-client": "2.12.*"
    }
}
```

### Git

[](#git)

If you already have git, the easiest way to download the Recurly PHP Client is with the git command:

```
git clone git://github.com/recurly/recurly-client-php.git /path/to/include/recurly

```

### By Hand

[](#by-hand)

Alternatively, you may download the PHP files in the `lib/` directory and place them within your PHP project.

Initialization
--------------

[](#initialization)

Load the Recurly library files and set your subdomain and API Key globally:

```
