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

ActiveLibrary[Payment Processing](/categories/payments)

dominservice/laravel-stripe
===========================

Laravel integration for Stripe.

1.5.1(2mo ago)023MITPHPPHP ^8.1|^8.2|^8.3

Since Feb 19Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/dominservice/laravel-stripe)[ Packagist](https://packagist.org/packages/dominservice/laravel-stripe)[ Docs](https://github.com/dominservice/laravel-stripe)[ RSS](/packages/dominservice-laravel-stripe/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (30)Versions (13)Used By (0)

Laravel Stripe
==============

[](#laravel-stripe)

![Packagist](https://camo.githubusercontent.com/c064671e49c6b18926b2167cf706b7c7b6be6dcf4afe1b8dbef48aae55744022/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f6d696e736572766963652f6c61726176656c2d7374726970652e737667)[![Latest Version](https://camo.githubusercontent.com/fb1521b6532836aa98c537810e0d96680ff24739bda48661bf9231d2e0cc3f96/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f646f6d696e736572766963652f6c61726176656c2d7374726970652e7376673f7374796c653d666c61742d737175617265)](https://github.com/dominservice/laravel-stripe/releases)[![Total Downloads](https://camo.githubusercontent.com/a695f26ace9bc28943c3b792dd8b9dc171dc2a6840cd50715858af6d6c992895/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f6d696e736572766963652f6c61726176656c2d7374726970652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dominservice/laravel-stripe)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Stripe integration for laravel 10+ on PHP 8.1+

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

[](#installation)

```
composer require dominservice/laravel-stripe
```

Add your stripe credentials in `.env`:

```
STRIPE_KEY=pk_live_XxxXXxXXX
STRIPE_SECRET=sk_live_XxxXXxXXX
STRIPE_WEBHOOK_CHECKOUT=whsec_XxxXXxXXX

```

Publish config:

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

Publish migrations:

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

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

[](#configuration)

In the configuration file you can change the list of allowed currencies. Check if your currency is on this list, and if it is not there, add it, otherwise you will not be able to use this package.

Also check if your User model is the same as the model specified in the `config/stripe.php` file

Usage
=====

[](#usage)

Routing
-------

[](#routing)

You must attach middleware `stripe.verify:{name}` to routes that have a reference to **payments webhook** so that the paths are secured.

```
Route::group(['middleware' => ['stripe.verify:checkout'], 'namespace' => '\App\Http\Controllers'], function () {
    Route::get('/webhook/payments', 'WebhookController@payments');

    (...)
```

`{name}` indicates which webhook key should be used. In the above example, it is `checkout`.

This means that `config("stripe.webhooks.signing_secrets.checkout")` will be used to verify webhook.

For direct Checkout Session `line_items.price_data` payloads, the package also accepts uppercase currency codes declared in `config/stripe.php` and normalizes them to Stripe's expected lowercase format before the request is sent.

Stripe Connect
--------------

[](#stripe-connect)

The package supports the base repositories required for Stripe Connect onboarding:

- `accounts()`
- `accountLinks()`
- `loginLinks()`

Typical platform flow:

```
use Dominservice\LaraStripe\Client as StripeClient;

$stripe = new StripeClient();

$account = $stripe->accounts()
    ->setType('express')
    ->setCountry('PL')
    ->setEmail($expert->email)
    ->setCapabilities([
        'transfers' => ['requested' => true],
    ])
    ->create($expert);

$onboarding = $stripe->accountLinks()
    ->setAccount($account->id)
    ->setRefreshUrl(route('expert.billing.refresh'))
    ->setReturnUrl(route('expert.billing.return'))
    ->setType('account_onboarding')
    ->create();

$loginLink = $stripe->loginLinks()->create($account->id);
```

For marketplace split payments handled on the platform account, create Checkout Sessions with:

- `payment_intent_data.application_fee_amount`
- `payment_intent_data.transfer_data.destination`

This allows the platform to collect its fee and transfer the remaining amount to the connected expert account.

Code
----

[](#code)

```
use Dominservice\LaraStripe\Client as StripeClient;

(...)

$stripe = (new StripeClient());

// Create product with price
$product = \App\Models\Product::find(1);
$productStripe = $stripe->products()
    ->setName($product->name)
    ->setActive(true)
    ->setExtendPricesCurrency('pln')
    ->setExtendPricesUnitAmount((float)$amount)
    ->setExtendPricesBillingScheme('per_unit')
    ->setExtendPricesRecurring(['interval' => 'month'])
    ->create($product);

// Create customer
$customer = $stripe->customers()
    ->setName($user->name)
    ->setEmail($user->email)
    ->setPhone($user->phone)
    ->setAddress([
        'country' => 'PL',
        'city' => 'Warszawa',
        'postal_code' => '00-000',
        'line1' => 'ul. kopernika 1/2',
    ])
    ->create($user);

// Checkout session
$session = $stripe->checkoutSessions()
    ->setSuccessUrl(route('payment.afterTransaction', $order->ulid) . '?session_id={CHECKOUT_SESSION_ID}')
    ->setCancelUrl(route('payment.canceled', $order->ulid))
    ->setMode('subscription')
    ->setClientReferenceId($order->ulid)
    ->setCustomer($customer->id)
    ->setLineItems([
        [
            'price' => $productStripe->default_price->id,
            'quantity' => 1,
        ]
     ])
     ->create();
```

**To be continued...** ;)

This repo is not finished

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance86

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity64

Established project with proven stability

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 ~72 days

Recently: every ~27 days

Total

12

Last Release

72d ago

PHP version history (3 changes)1.0.0PHP ^8.1

1.3.0PHP ^8.1|^8,2|^8.3

1.5.1PHP ^8.1|^8.2|^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d67c041316385020aafb7eef9f11971d6fad80a11a44f4078273bda6890722d?d=identicon)[dominservice](/maintainers/dominservice)

---

Tags

laravelstripe

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/cashier

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

2.6k30.0M148](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)

PHPackages © 2026

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