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

ActiveLibrary[Payment Processing](/categories/payments)

alturacode/billing-laravel
==========================

AlturaCode Billing for Laravel

v0.9.1(2mo ago)097MITPHPPHP &gt;=8.4

Since Dec 8Pushed 2mo agoCompare

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

READMEChangelogDependencies (12)Versions (24)Used By (0)

Altura Code Billing for Laravel
===============================

[](#altura-code-billing-for-laravel)

Altura Code Billing for Laravel gives you a clean way to manage subscriptions in your Laravel applications.

***This package is still under active development.***

The Motivation
--------------

[](#the-motivation)

We created this package because we needed to support multiple billing providers (Stripe &amp; PayPal) in one of our projects. Laravel Cashier, while great, only supports either Stripe or Paddle.

This package acts as a nice wrapper for [Altura Code Billing](https://github.com/alturacode/billing-core), giving us a nice API to manage subscriptions in our Laravel apps.

We went a little further and made purchasable products as part of the core package; this allows you to easily define products, prices and features right from a config file. You can optionally sync with billing providers like Stripe to get started quickly.

TL;DR
-----

[](#tldr)

```
use AlturaCode\Billing\Laravel\HasBilling;
use AlturaCode\Billing\Laravel\Billable;

class User extends Model implements Billable {
    use HasBilling;
}

// Create a subscription
$result = $user->newSubscription('default')
    ->withPlan('plan_id', 'month', 1, 'usd') // or withPlanPriceId('product_price_id')
    ->withTrialDays(14)
    ->create();

if ($result->requiresAction()) {
    return $result->redirect();
}

$subscription = $result->subscription; // AlturaCode\Billing\Laravel\Subscription
```

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

[](#requirements)

- PHP 8.4+
- Laravel 12.x

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

[](#installation)

Install the package

```
composer require alturacode/billing-laravel

```

Make your billable model implement `AlturaCode\Billing\Laravel\Billable` and use the `AlturaCode\Billing\Laravel\HasBilling` trait:

```
use AlturaCode\Billing\Laravel\HasBilling;
use AlturaCode\Billing\Laravel\Billable;

class User extends Model implements Billable
{
    use HasBilling;
}
```

Publish the config file and migrations

```
php artisan vendor:publish --provider="AlturaCode\Billing\Laravel\BillingServiceProvider"

```

Quick start
-----------

[](#quick-start)

Create a subscription for a user:

```
// In a controller action
$result = $request->user()->newSubscription('default')
    ->withPlanPriceId('price_basic_monthly', quantity: 1)
    ->withTrialDays(14)
    ->create();

if ($result->requiresAction()) {
    return $result->redirect();
}

$subscription = $result->subscription; // AlturaCode\Billing\Laravel\Subscription
```

Check a user’s subscription status:

```
if ($user->subscribed()) {
    // has an active default subscription
}

$sub = $user->subscription('default'); // Eloquent model or null
```

Check if a user can use a feature:

```
$user->features()->canUse('projects', 3); // boolean
```

Query subscriptions:

```
use AlturaCode\Billing\Laravel\Subscription;

$active = Subscription::query()
    ->provider('sync')
    ->active()
    ->get();
```

Stripe
------

[](#stripe)

Install the Stripe package:

```
composer require alturacode/billing-stripe

```

Register the billing provider in `config/billing.php`:

```
'providers' => [
    // ...
    'stripe' => AlturaCode\Billing\Stripe\StripeBillingProvider::class,
]
```

Use Stripe for subscriptions:

```
$user->newSubscription('default')
    ->withPlanPriceId('price_basic_monthly')
    ->withProvider('stripe')
    ->create([
       'success_url' => 'https://example.com/success',
        'cancel_url' => 'https://example.com/cancel',
   ]);
```

License
-------

[](#license)

MIT License. See `LICENSE` for details.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance85

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Total

23

Last Release

75d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71cb68c0b70885cd6cb1f518f31b2253ced4d4c2d25d0e540bb2553982546ecc?d=identicon)[gerardojbaez](/maintainers/gerardojbaez)

---

Top Contributors

[![gerardojbaez](https://avatars.githubusercontent.com/u/11788389?v=4)](https://github.com/gerardojbaez "gerardojbaez (46 commits)")

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[cloudcreativity/laravel-stripe

Laravel integration for Stripe, including Stripe Connect.

4112.4k](/packages/cloudcreativity-laravel-stripe)[asciisd/knet

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

141.1k](/packages/asciisd-knet)[dena-a/iran-payment

a Laravel package to handle Internet Payment Gateways for Iran Banking System

312.4k1](/packages/dena-a-iran-payment)

PHPackages © 2026

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