PHPackages                             twovmodules/revenuecat-sdk - 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. twovmodules/revenuecat-sdk

ActiveLibrary[Payment Processing](/categories/payments)

twovmodules/revenuecat-sdk
==========================

PHP SDK for RevenueCat payment service

1.0.0(1y ago)31.3k↓41.7%MITPHPPHP ^8.2CI passing

Since Apr 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/2vmodules/revenuecat-sdk)[ Packagist](https://packagist.org/packages/twovmodules/revenuecat-sdk)[ RSS](/packages/twovmodules-revenuecat-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (2)Used By (0)

[ ![2Vmodules Logo](https://camo.githubusercontent.com/0d918efe7eae499ba4c778038df8e6f1980c1d1d808c129423270e40867208d5/68747470733a2f2f32766d6f64756c65732e636f6d2f696d616765732f6c6f676f2e737667)](https://2vmodules.com)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c8d5c24b78d4b6032e735ee909297f4cc8d04cca19ce4b028d8906eeb88f25e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74776f766d6f64756c65732f726576656e75656361742d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/twovmodules/revenuecat-sdk)[![Tests](https://github.com/2vmodules/revenuecat-sdk/workflows/tests/badge.svg)](https://github.com/2vmodules/revenuecat-sdk/actions)

📌 Description
-------------

[](#-description)

This SDK provides a convenient interface for working with the RevenueCat API, following PSR standards. It supports managing projects, customers, subscriptions, entitlements, and other RevenueCat entities.

🚀 Installation
--------------

[](#-installation)

```
composer require twovmodules/revenuecat-sdk
```

🛠 Minimum Requirements
----------------------

[](#-minimum-requirements)

- PHP 8.2+
- PSR-7, PSR-17, PSR-18 compatible HTTP client (e.g., Guzzle)

📖 Quick Start
-------------

[](#-quick-start)

### 1. Initialize the Minimal Client

[](#1-initialize-the-minimal-client)

```
use Twovmodules\RevenueCat\RevenueCatClient;
use Twovmodules\RevenueCat\Configuration;
use GuzzleHttp\Psr7\HttpFactory;
use GuzzleHttp\Client;

$configuration = new Configuration('_your_api_key_here_');

$guzzleClient = new Client;
$requestFactory = new HttpFactory();
$streamFactory = new HttpFactory();

$revenueCat = new RevenueCatClient(
    psrHttpClient: $guzzleClient,
    configuration: $configuration,
    requestFactory: $requestFactory,
    streamFactory: $streamFactory
);
```

### 2. Retrieve a List of Customers

[](#2-retrieve-a-list-of-customers)

```
$customers = $revenueCat->customers()->list('project_id');
foreach ($customers as $customer) {
    echo $customer->id . "\n";
}
```

### 3. Create a New Customer

[](#3-create-a-new-customer)

```
use Twovmodules\RevenueCat\Dto\Request\CreateCustomerDto;

$request = new CreateCustomerDto(id: 'customer_123');
$customer = $revenueCat->customers()->create($request, 'project_id');
echo "Customer created: " . $customer->id;
```

📚 Available Services
--------------------

[](#-available-services)

- `apps()` — Operations about apps.
- `projects()` — Operations about projects.
- `customers()` — Operations about customers.
- `offerings()` — Operations about offerings.
- `subscriptions()` — Operations about subscriptions.
- `entitlements()` — Operations about entitlements.
- `products()` — Operations about products.
- `invoices()` — Operations about invoices.
- `overviewMetrics()` — Operations about chart metrics.
- `packages()` — Operations about packages.
- `purchases()` — Operations about purchases.

⚠️ Error Handling
-----------------

[](#️-error-handling)

```
try {
    $apps = $revenueCat->apps()->list('project_id');
} catch (RevenueCatException $e) {
    // Handle specific RevenueCat errors
    echo "Error: " . $e->getMessage();
} catch (\Exception $e) {
    // Handle other exceptions
    echo "Unexpected error: " . $e->getMessage();
}
```

📖 More Information
------------------

[](#-more-information)

- [Usage Documentation](docs/Usage.md)

📄 License
---------

[](#-license)

This SDK is open-sourced under MIT [License](LICENSE.MD).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance46

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

403d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/70cf11b66eb110cad5d008e4648633588e56acfe6b6e0ca3a83d533456e442ca?d=identicon)[asanovr](/maintainers/asanovr)

---

Top Contributors

[![asanovr](https://avatars.githubusercontent.com/u/6459461?v=4)](https://github.com/asanovr "asanovr (12 commits)")

---

Tags

phprevenuecatsdk

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/twovmodules-revenuecat-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/twovmodules-revenuecat-sdk/health.svg)](https://phpackages.com/packages/twovmodules-revenuecat-sdk)
```

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[tamara-solution/php-sdk

Tamara PHP Client Library

10259.4k1](/packages/tamara-solution-php-sdk)[flutterwavedev/flutterwave-v3

A simple SDK for integrating to Flutterwave Payment

24174.1k6](/packages/flutterwavedev-flutterwave-v3)[dnetix/redirection

Library to connect with PlacetoPay Checkout service

17123.3k2](/packages/dnetix-redirection)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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