PHPackages                             celtyvsk/cashier-connect - 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. celtyvsk/cashier-connect

ActiveLibrary[Payment Processing](/categories/payments)

celtyvsk/cashier-connect
========================

Laravel Cashier Connect add support for Stripe Connect to Laravel Cashier.

0.3.12(5y ago)07MITPHPPHP ^8.0

Since Mar 24Pushed 5y agoCompare

[ Source](https://github.com/celtyvsk/cashier-connect)[ Packagist](https://packagist.org/packages/celtyvsk/cashier-connect)[ RSS](/packages/celtyvsk-cashier-connect/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (17)Versions (14)Used By (0)

Introduction
------------

[](#introduction)

Laravel Cashier Connect add support for Stripe Connect Subscription to laravel Cashier (based on v10.7.1).

Documentation
=============

[](#documentation)

1. Install the package

```
composer require "oixan/cashier-connect"

```

2. Follow the instructions of cashier in the [official guide](https://laravel.com/docs/7.x/billing#configuration "Instructions")The installations process is the same.
3. Add the Trait to User model `use Billable` from `use Laravel\CashierConnect\Billable`

Create your .env file
---------------------

[](#create-your-env-file)

You will need to set the Stripe **Testing** Secret env variable before your `vendor/bin/phpunit` call in order to run the Cashier Connect tests:

```
STRIPE_SECRET=

```

Please note that due to the fact that actual API requests against Stripe are being made, these tests take a few minutes to run.

How this package work.
----------------------

[](#how-this-package-work)

All the default cashier methods remain the same if not direct support by CashierConnect.

This package assume you created yours Stripe Accounts directly or through API then assign the Account id to **user-&gt;stripe\_account\_id**.

Every user can be a customers or an Stripe Account.

Basic Method Added to User model
--------------------------------

[](#basic-method-added-to-user-model)

```
$user = user from db or wathever;
$user->getStripeAccount(); // Check if every cashier call will go to Stripe Account
$user->setStripeAccount($userAccount); // Pass a User instance then every cashier call will go to Stripe Account
$user->unsetStripeAccount; // Remove the userAccount, cashier will work with default setting.
$user->pauseStripeAccount // Pause the userAccount, cashier will work with default setting.
$user->resumeStripeAccount  // Resume the previous userAccount, cashier call will go to Stripe Account

```

\*\*\* IMPORTANT \*\*\* any further call after setStripeAccount() will be direct to Stripe Account so remember to call unsetStripeAccount() if needed.

Methods Supported (Version 0.3.0).
----------------------------------

[](#methods-supported-version-030)

The `setStripeAccount($userAccount)` method make every subsequent call goes from your Platform to Stripe Account passed like parameter. If you need to change the userAccount or pause the StripeAccount call see the previous section.

Creating Subscriptions

```
   $user->setStripeAccount($userAccount)->newSubscription('main', 'plan_id')->create("pm_card_visa");
```

Add user detail

```
$user->newSubscription('main', 'monthly')->create($token, [
  'email' => $email,
]);
```

Checking Subscription Status

```
if ($user->subscribed('main')) {
   //
}
```

Subscribe to plan

```
if ($user->subscribedToPlan('monthly', 'main')) {
  //
}
```

Reccuring check

```
if ($user->subscription('main')->recurring()) {
  //
}
```

Cancelled Subscription Status

```
if ($user->subscription('main')->cancelled()) {
  //
}

if ($user->subscription('main')->onGracePeriod()) {
  //
}

if ($user->subscription('main')->ended()) {
  //
}
```

Changing Plans

```
$user->subscription('main')->swap('provider-plan-id');
```

Subscription Quantity

```
$user->subscription('main')->incrementQuantity();

// Add five to the subscription's current quantity...
$user->subscription('main')->incrementQuantity(5);

$user->subscription('main')->decrementQuantity();

// Subtract five to the subscription's current quantity...
$user->subscription('main')->decrementQuantity(5);
```

Subscription Ancor Date

```
$user->newSubscription('main', 'premium')
     ->anchorBillingCycleOn( Carbon::parse('first day of next month'))
     ->create($token);
```

Subscription Trials

```
$user->newSubscription('main', 'monthly')
            ->trialDays(10)
            ->create($token);

$user->newSubscription('main', 'monthly')
        ->trialUntil(Carbon::now()->addDays(10))
        ->create($token);

$user->onTrial('main')

$user->subscription('main')->onTrial()
```

Cancelling Subscriptions

```
$user->subscription('main')->cancel();

if ($user->subscription('main')->onGracePeriod()) {
    //
}

$user->subscription('main')->cancelNow();
```

Resume Subscriptions

```
$user->subscription('main')->resume();
```

**\*All cashier methods not in list are not tested to work with Stripe Account**

More.
-----

[](#more)

If you want set an application fee set on user model

```
public function applicationFeePercent()
{
    return 40;
}
```

The Web hook from stripe connect have different secret key. Set

```
services.stripe.webhook.connect_secret

```

to allow cashier connect to accept webhook from stripe connect.

License
-------

[](#license)

Laravel Cashier Connect is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~61 days

Recently: every ~89 days

Total

13

Last Release

1865d ago

PHP version history (2 changes)0.0.31PHP ^7.1.3

0.3.12PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/81839961?v=4)[celtyvsk](/maintainers/celtyvsk)[@celtyvsk](https://github.com/celtyvsk)

---

Top Contributors

[![oixan](https://avatars.githubusercontent.com/u/22665235?v=4)](https://github.com/oixan "oixan (35 commits)")[![celtyvsk](https://avatars.githubusercontent.com/u/81839961?v=4)](https://github.com/celtyvsk "celtyvsk (4 commits)")[![nickescobedo](https://avatars.githubusercontent.com/u/2837169?v=4)](https://github.com/nickescobedo "nickescobedo (1 commits)")

---

Tags

laravelstripebilling

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/celtyvsk-cashier-connect/health.svg)

```
[![Health](https://phpackages.com/badges/celtyvsk-cashier-connect/health.svg)](https://phpackages.com/packages/celtyvsk-cashier-connect)
```

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[lanos/laravel-cashier-stripe-connect

Adds Stripe Connect functionality to Laravel's main billing package, Cashier.

84138.9k](/packages/lanos-laravel-cashier-stripe-connect)[asciisd/knet

Knet package is provides an expressive, fluent interface to KNet's payment services.

141.1k](/packages/asciisd-knet)

PHPackages © 2026

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