PHPackages                             freelancernishad/laravel-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. [Payment Processing](/categories/payments)
4. /
5. freelancernishad/laravel-stripe

ActiveLibrary[Payment Processing](/categories/payments)

freelancernishad/laravel-stripe
===============================

Stripe Payment Gateway integration for Laravel

v1.0.1(1mo ago)02↓100%MITPHPPHP ^8.2

Since May 6Pushed 1mo agoCompare

[ Source](https://github.com/freelancernishad/laravel-stripe)[ Packagist](https://packagist.org/packages/freelancernishad/laravel-stripe)[ RSS](/packages/freelancernishad-laravel-stripe/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Laravel Stripe Payment Gateway
==============================

[](#laravel-stripe-payment-gateway)

A reusable and extensible Laravel package for integrating Stripe Payment Gateway. Supports Checkout Sessions, Payment Intents, and Subscriptions.

Features
--------

[](#features)

- **Flexible Models**: Link payments to any project entity using polymorphic relations.
- **Configurable**: Easily swap log models and table names.
- **Robust Webhooks**: Pre-configured webhook handlers for common Stripe events.
- **Metadata Support**: Store arbitrary JSON data with every transaction.

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

[](#installation)

1. Install the package via composer:

```
composer require freelancernishad/laravel-stripe
```

2. Publish the config and migrations:

```
php artisan vendor:publish --tag=stripe-config
php artisan vendor:publish --tag=stripe-migrations
```

3. Run the migrations:

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

Add your Stripe credentials to your `.env` file:

```
STRIPE_KEY=pk_test_...
STRIPE_SECRET=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
```

Basic Usage
-----------

[](#basic-usage)

### Checkout Session Example

[](#checkout-session-example)

```
use FreelancerNishad\Stripe\Services\StripeService;

public function checkout(StripeService $stripe) {
    $session = $stripe->createCheckoutSession(auth()->user(), [
        [
            'price_data' => [
                'currency' => 'usd',
                'product_data' => ['name' => 'T-shirt'],
                'unit_amount' => 2000,
            ],
            'quantity' => 1,
        ]
    ], url('/success'), url('/cancel'));

    return redirect()->to($session->url);
}
```

Customization
-------------

[](#customization)

### Adding Extra Fields

[](#adding-extra-fields)

Use the `meta_data` parameter to store additional info:

```
$stripe->createCheckoutSession($user, $items, $successUrl, $cancelUrl, false, [
    'order_id' => 123,
    'referral' => 'friend'
]);
```

### Overriding the Log Model

[](#overriding-the-log-model)

1. Extend `FreelancerNishad\Stripe\Models\StripeLog`.
2. Map your model in `config/stripe.php`:

```
'models' => [
    'log' => \App\Models\MyStripeLog::class,
],
```

Webhooks
--------

[](#webhooks)

The package includes a default webhook handler. Point your Stripe Webhook URL to: `https://your-domain.com/v1/payments/stripe/webhook`

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance93

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Every ~0 days

Total

2

Last Release

34d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5248b2f380366bf3fbc53a1882e408cb2f47aecbc7627a6dbc9b17f2e0d38fc8?d=identicon)[freelancernishad123](/maintainers/freelancernishad123)

---

Top Contributors

[![freelancernishad](https://avatars.githubusercontent.com/u/57829640?v=4)](https://github.com/freelancernishad "freelancernishad (5 commits)")

---

Tags

laravelstripepaymentgateway

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4849.3k](/packages/sebdesign-laravel-viva-payments)[tastyigniter/ti-ext-payregister

Allows you to accept credit card payments using PayPal, Stripe, Authorize.Net and/or Mollie.

1016.7k6](/packages/tastyigniter-ti-ext-payregister)

PHPackages © 2026

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