PHPackages                             digkill/yookassa-laravel - 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. digkill/yookassa-laravel

ActiveProject[Payment Processing](/categories/payments)

digkill/yookassa-laravel
========================

YooKassa for Laravel

v1.1.1(2y ago)4524MITPHPPHP &gt;=8.1

Since Jan 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/digkill/YooKassaLaravel)[ Packagist](https://packagist.org/packages/digkill/yookassa-laravel)[ RSS](/packages/digkill-yookassa-laravel/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (9)Used By (0)

YooKassa Laravel
================

[](#yookassa-laravel)

Installing
----------

[](#installing)

```
composer require digkill/yookassa-laravel
```

```
php artisan vendor:publish --tag=yookassa.migrations
php artisan migrate
```

```
php artisan vendor:publish --tag=yookassa.config
```

```
php artisan vendor:publish --provider=Digkill\YooKassaLaravel\YooKassaServiceProvider
```

```
// Facade
use Digkill\YooKassaLaravel\Facades\YooKassaFacade;
$yookassaPayment = YookassaFacade::createPayment(10000, 'test payment');

// Service
$service = app(Digkill\YooKassaLaravel\Services\PaymentService::class);
$yookassaPayment = $service->createPayment(10000, 'test payment');
```

To receive the request you need to add a URL

[![./assets/img.jpg](./assets/img.jpg)](./assets/img.jpg)

And subscribe to the event Digkill\\YooKassaLaravel\\Events\\YookassaPaymentNotification

```
namespace App\Providers;
class EventServiceProvider extends ServiceProvider
...
    protected $listen = [
        YookassaPaymentNotification::class => [
        YookassaPaymentStatus::class
    ]
];
...
```

```
namespace App\Listeners;
class YookassaPaymentStatus implements ShouldQueue
...
public function handle(YookassaPaymentNotification $event): void
{
    if ($event->payment->status === PaymentStatus::SUCCEEDED->value) {
    }
}
```

### If you use doctrine, the entity is located in the Entities folder

[](#if-you-use-doctrine-the-entity-is-located-in-the-entities-folder)

### .env

[](#env)

```
YOOKASSA_SHOP_ID=
YOOKASSA_SECRET_KEY=
YOOKASSA_REDIRECT=
```

### Use notifications

[](#use-notifications)

```
        $yooKassa = new YooKassa([]);
        $paymentRepository = new PaymentRepository();
        $paymentService = new PaymentService($yooKassa, $paymentRepository);

        $requestBody = $request->all();
        if (!isset($requestBody['event'])) {
            throw new \Exception('event not found');
        }

        if (($requestBody['event'] === NotificationEventType::PAYMENT_SUCCEEDED)) {
            $notification = new NotificationSucceeded($requestBody);
        } elseif ($requestBody['event'] === NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE) {
            $notification = new NotificationWaitingForCapture($requestBody);
        } else {
            $notification = new NotificationCanceled($requestBody);
        }

        $payment = $notification->getObject();
        $status = PaymentStatus::tryFrom($payment->getStatus());
        $paymentService->setStatus($payment->getId(), $status);
        $yooKassaPayment = $paymentService->findByPaymentId($payment->getId());
        YookassaPaymentNotification::dispatch($yooKassaPayment);

        return response()->json();
```

MIT License
===========

[](#mit-license)

Copyright (c) 2024 Vitaliy Edifanov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

8

Last Release

889d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16583a7e4b8090214b0718904b4147777568abdc1a57c78feea4029f32cb9e23?d=identicon)[digkill](/maintainers/digkill)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digkill-yookassa-laravel/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11937.9M7.0k](/packages/illuminate-http)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4851.0k](/packages/sebdesign-laravel-viva-payments)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

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