PHPackages                             udaykumar77/stripe - 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. udaykumar77/stripe

ActiveLibrary

udaykumar77/stripe
==================

stripe easy integration with laravel

v1.0(9y ago)115PHP

Since Sep 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/udaykumar77/stripe)[ Packagist](https://packagist.org/packages/udaykumar77/stripe)[ RSS](/packages/udaykumar77-stripe/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Stripe + Laravle Cashier (L 5.2)
================================

[](#stripe--laravle-cashier-l-52)

Stripe is the best way to accept payments online and in mobile apps. We handle billions of dollars every year for forward-thinking businesses around the world.

### Installation (Laravel Cashier)

[](#installation-laravel-cashier)

### Composer

[](#composer)

First, add the Cashier package for Stripe to your composer.json file and run the composer update command:

```
"laravel/cashier": "~6.0"
```

### Service Provider

[](#service-provider)

Next, register the Laravel\\Cashier\\CashierServiceProvider service provider in your app configuration file.

```
Laravel\Cashier\CashierServiceProvider::class,
```

### Database Migrations

[](#database-migrations)

Before using Cashier, we'll also need to prepare the database. We need to add several columns to your users table and create a new subscriptions table to hold all of our customer's subscriptions:

```
Schema::table('users', function ($table) {
    $table->string('stripe_id')->nullable();
    $table->string('card_brand')->nullable();
    $table->string('card_last_four')->nullable();
    $table->timestamp('trial_ends_at')->nullable();
});

Schema::create('subscriptions', function ($table) {
    $table->increments('id');
    $table->integer('user_id');
    $table->string('name');
    $table->string('stripe_id');
    $table->string('stripe_plan');
    $table->integer('quantity');
    $table->timestamp('trial_ends_at')->nullable();
    $table->timestamp('ends_at')->nullable();
    $table->timestamps();
});
```

Once the migrations have been created, simply run the migrate Artisan command.

### Model Setup

[](#model-setup)

Next, add the Billable trait to your model definition:

```
use Laravel\Cashier\Billable;

class User extends Authenticatable
{
    use Billable;
}
```

### Provider Keys

[](#provider-keys)

Next, you should configure your Stripe key in your services.php configuration file:

```
'stripe' => [
    'model'  => App\User::class,
    'secret' => env('STRIPE_SECRET'),
],
```

### Installation Stripe

[](#installation-stripe)

### composer

[](#composer-1)

First, add the udaykumar77/stripe package to your composer.json file and run the composer update command:

```
"udaykumar77/stripe": "v1.0"
```

### Service Provider

[](#service-provider-1)

Next, register the UdayKumar77\\Stripe\\StripeServiceProvider service provider in your app configuration file.

```
UdayKumar77\Stripe\StripeServiceProvider::class,
```

### Facade

[](#facade)

Next, register the UdayKumar77\\Stripe\\Facade\\StripeController facade in your app configuration file aliases.

```
'Stripe' => UdayKumar77\Stripe\Facade\StripeController::class,
```

### Command

[](#command)

Run the following command from your terminal.

```
composer dump-autoload
```

### Register your stripe account

[](#register-your-stripe-account)

- Go to Account Settings -&gt; API Keys
- Add the Secret &amp; Publishable keys in your .env file

### .env

[](#env)

Add the following in your .env file

```
STRIPE_SECRET=**************************
STRIPE_PUBLISHABLE_SECRET=*********************
```

### Methods

[](#methods)

- To generate Stripe Token

```
Stripe::generateCardToken(array $params)

$params = ["number"     => "4242424242424242",
            "exp_month" => "9",
            "exp_year"  => "2017",
            "cvc"       => "456"]
```

### Usage

[](#usage)

use the name space in your controller like this

```
 "4242424242424242",
                                "exp_month" => "9",
                                "exp_year"  => "2017",
                                "cvc"       => "456"]);
        return response()->json($stripeToken);
    }
```

License
-------

[](#license)

MIT License (MIT) @ Uday Kumar Gudivada

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

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

3542d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/43e2abc7d2b212277091ee5decb791ab913ce76dbf1c43a9b8512052d3908b11?d=identicon)[udaykumar77](/maintainers/udaykumar77)

---

Top Contributors

[![ahex-tech](https://avatars.githubusercontent.com/u/185927893?v=4)](https://github.com/ahex-tech "ahex-tech (5 commits)")[![udaykumar77](https://avatars.githubusercontent.com/u/21197855?v=4)](https://github.com/udaykumar77 "udaykumar77 (1 commits)")

### Embed Badge

![Health badge](/badges/udaykumar77-stripe/health.svg)

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

PHPackages © 2026

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