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

ActiveLibrary[Payment Processing](/categories/payments)

vatly/vatly-laravel
===================

Laravel integration for Vatly, inspired by Laravel Cashier

v0.3.0-alpha.1(2mo ago)113↓100%MITPHPPHP ^8.2CI passing

Since Feb 26Pushed 2mo agoCompare

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

READMEChangelog (4)Dependencies (10)Versions (10)Used By (0)

Vatly Laravel
=============

[](#vatly-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/758aba7b8d24f071b0d1414db12a6cca010b62f62e213d5c58b3a74244788414/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7661746c792f7661746c792d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vatly/vatly-laravel)[![Tests](https://github.com/Vatly/vatly-laravel/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/Vatly/vatly-laravel/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/35ef66a9eefff771deaf3735c0e27c434444a5f196903c9a447a36797313de87/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7661746c792f7661746c792d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vatly/vatly-laravel)

> **Alpha release -- under active development. Expect breaking changes.**

Laravel integration for [Vatly](https://vatly.com) billing, inspired by Laravel Cashier. Provides Eloquent models, a `Billable` trait, checkout/subscription builders, webhook handling, and event listeners.

Built on top of [vatly/vatly-fluent-php](https://github.com/Vatly/vatly-fluent-php).

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

[](#installation)

```
composer require vatly/vatly-laravel:v0.3.0-alpha.1
```

Pin to an exact version. This is an alpha release and the API will change.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12
- A Vatly API key ([vatly.com](https://vatly.com))

Setup
-----

[](#setup)

1. Publish the config:

```
php artisan vendor:publish --tag=vatly-config
```

2. Add your API key to `.env`:

```
VATLY_API_KEY=test_xxxxxxxxxxxx
VATLY_WEBHOOK_SECRET=your-webhook-secret

```

3. Publish and run migrations:

```
php artisan vendor:publish --tag=vatly-migrations
php artisan vendor:publish --tag=vatly-billable-migrations
php artisan migrate
```

4. Add the `Billable` trait to your User model:

```
use Vatly\Laravel\Contracts\BillableInterface;
use Vatly\Laravel\Billable;

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

Usage
-----

[](#usage)

```
// Create a checkout
$checkout = $user->newCheckout()
    ->withItems(collect(['subscription_plan_id']))
    ->create(
        redirectUrlSuccess: 'https://example.com/success',
        redirectUrlCanceled: 'https://example.com/canceled',
    );

// Swap subscription plan
$user->subscription('default')->swap('plan_premium');

// Cancel subscription
$user->subscription('default')->cancel();
```

Webhooks
--------

[](#webhooks)

The package registers a webhook endpoint at `/vatly/webhook` automatically. Configure your webhook secret in the Vatly dashboard.

Events dispatched:

- `Vatly\Events\WebhookReceived`
- `Vatly\Events\SubscriptionStarted`
- `Vatly\Events\SubscriptionCanceledImmediately`
- `Vatly\Events\SubscriptionCanceledWithGracePeriod`

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance87

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

4

Last Release

74d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78913b3d9fc2c28cf333e08366566ac23d0894a14d4c0914365acfb208420c29?d=identicon)[sandervanhooft](/maintainers/sandervanhooft)

---

Top Contributors

[![sandervanhooft](https://avatars.githubusercontent.com/u/7265703?v=4)](https://github.com/sandervanhooft "sandervanhooft (29 commits)")

---

Tags

billinglaravelsaassubscriptionsvatlylaravelbillingsubscriptionsvatly

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

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

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

###  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)[asciisd/knet

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

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

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

84138.9k](/packages/lanos-laravel-cashier-stripe-connect)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)

PHPackages © 2026

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