All Projects → renoki-co → Jetstream Cashier Billing Portal

renoki-co / Jetstream Cashier Billing Portal

Licence: apache-2.0
Jetstream Cashier Billing Portal is a simple scaffolding billing portal to manage subscriptions, invoices and payment methods, built on top of Jetstream & Cashier Register.

Projects that are alternatives of or similar to Jetstream Cashier Billing Portal

Gringotts
A complete payment library for Elixir and Phoenix Framework
Stars: ✭ 396 (+780%)
Mutual labels:  stripe, payment, billing
Dj Stripe
Django + Stripe Made Easy
Stars: ✭ 1,022 (+2171.11%)
Mutual labels:  subscriptions, stripe, billing
Chip
A drop-in subscription billing UI for Laravel
Stars: ✭ 91 (+102.22%)
Mutual labels:  stripe, billing, laravel
Akaunting
Free and Online Accounting Software
Stars: ✭ 4,599 (+10120%)
Mutual labels:  invoicing, billing, laravel
cashier-paystack
Cashier provides an expressive, fluent interface to Paystack's subscription billing services.
Stars: ✭ 44 (-2.22%)
Mutual labels:  payment, billing, subscriptions
Commerce billing
A payment processing library for Elixir
Stars: ✭ 170 (+277.78%)
Mutual labels:  stripe, payment, billing
Payumlaravelpackage
Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.
Stars: ✭ 121 (+168.89%)
Mutual labels:  stripe, payment, laravel
Billing
A general purpose interface to Stripe that's optimized for Laravel 5 SaaS applications.
Stars: ✭ 14 (-68.89%)
Mutual labels:  stripe, billing, laravel
invoicing
GetPaid (Formerly the Invoicing plugin) is a lightweight Payments and Invoicing system for WordPress. It can be used to sell anything online via payment forms or buy now buttons that can be added to any landing page. It can also be used by freelancers to manage their Invoices or by 3rd party Themes and Plugins as their payment system. GeoDirecto…
Stars: ✭ 34 (-24.44%)
Mutual labels:  stripe, payment, invoicing
Invoiceneko
An Open Sourced Invoice System developed for anyone who needs to generate out an invoice and manage clients
Stars: ✭ 204 (+353.33%)
Mutual labels:  invoicing, billing, laravel
drf-stripe-subscription
An out-of-box Django REST framework solution for payment and subscription management using Stripe.
Stars: ✭ 42 (-6.67%)
Mutual labels:  stripe, payment, billing
Stripe
A comprehensive PHP Library for the Stripe.
Stars: ✭ 256 (+468.89%)
Mutual labels:  stripe, payment, billing
Yaldash
👻 It's never been easier to build and customize admin panels. Yah! yaldash is a beautifully designed administration panel for Laravel.
Stars: ✭ 338 (+651.11%)
Mutual labels:  payment, laravel
Djaodjin Saas
Django application for software-as-service and subscription businesses
Stars: ✭ 297 (+560%)
Mutual labels:  subscriptions, stripe
Gauzy
Gauzy™ - Open-Source Business Management Platform (ERP/CRM/HRM)
Stars: ✭ 374 (+731.11%)
Mutual labels:  invoicing, billing
Laravel Stripe Webhooks
Handle Stripe webhooks in a Laravel application
Stars: ✭ 300 (+566.67%)
Mutual labels:  stripe, laravel
Crater
Open Source Invoicing Solution for Individuals & Businesses
Stars: ✭ 4,897 (+10782.22%)
Mutual labels:  payment, laravel
Solidinvoice
Simple and elegant invoicing solution.
Stars: ✭ 294 (+553.33%)
Mutual labels:  invoicing, billing
Laravel Subscriptions
Rinvex Subscribable is a flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
Stars: ✭ 488 (+984.44%)
Mutual labels:  subscriptions, laravel
Payumbundle
Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.
Stars: ✭ 509 (+1031.11%)
Mutual labels:  stripe, payment

Jetstream Cashier Billing Portal

CI codecov StyleCI Latest Stable Version Total Downloads Monthly Downloads License

Jetstream Cashier Billing Portal is a simple scaffolding billing portal to manage subscriptions, invoices and payment methods, built on top of Jetstream & Cashier Register.

Currently, only Inertia with Stripe are supported. For Paddle and/or Livewire, any PR is welcomed!

example

🤝 Supporting

Renoki Co. on GitHub aims on bringing a lot of open source projects and helpful projects to the world. Developing and maintaining projects everyday is a harsh work and tho, we love it.

If you are using your application in your day-to-day job, on presentation demos, hobby projects or even school projects, spread some kind words about our work or sponsor our work. Kind words will touch our chakras and vibe, while the sponsorships will keep the open source projects alive.

ko-fi

🚀 Installation

This package assumes you have installed Jetstream in your project. If not, head over to Jetstream website for installation steps.

Scaffolding

You can install the package via composer:

composer require renoki-co/jetstream-cashier-billing-portal

You shall install the Cashier Billing Portal in one command, just like Jetstream. This will install Cashier, Cashier Register and Billing Portal.

$ php artisan billing-portal:install

Stripe Checkout

Starting with Laravel Cashier v12.7.0, you can now use Stripe Checkout for easier implementation. Jetstream Cashier Billing Portal supports this and will send the user directly to the Checkout portal for new subscriptions.

Starting with package version 2.x, you will also need to set up Stripe Webhooks in your own project to benefit from Stripe Checkout, that is used by default. If not, check the 1.x branch or 1.x releases that do not use Stripe Checkout.

The only thing you should do is to add the Stripe Javascript SDK code before the app.js import in your app.blade.php file:

<script src="https://js.stripe.com/v3/"></script>
<script src="{{ mix('js/app.js') }}" defer></script>

Defining Plans

You will also have to prepare the plans in CashierRegisterServiceProvider.

Import the created app/Providers/CashierRegisterServiceProvider class into your app.php:

$providers = [
    // ...
    \App\Providers\CashierRegisterServiceProvider::class,
];

🙌 Usage

In CashierRegisterServiceProvider's boot method you may define the plans you need:

use RenokiCo\CashierRegister\CashierRegisterServiceProvider as BaseServiceProvider;
use RenokiCo\CashierRegister\Saas;

class CashierRegisterServiceProvider extends BaseServiceProvider
{
    /**
     * Boot the service provider.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        // Define plans here.
    }
}

By default, the subscriptions are accessible under /user/billing/subscription, but you can change the /user/billing prefix easily in config/billing-portal.php.

For more information about defining plans and quotas, check Cashier Register documentation and check Laravel Cashier for Stripe documentation on handling the billing.

Custom Billables

By default, the billing is made directly on the currently authenticated model. In some cases like using billable trait on the Team model, you may change the model that will be retrieved from the current request. You may define it in the boot() method of CashierRegisterServiceProvider:

use Illuminate\Http\Request;
use RenokiCo\BillingPortal\BillingPortal;

class CashierRegisterServiceProvider extends BaseServiceProvider
{
    /**
     * Boot the service provider.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        BillingPortal::setBillableOnRequest(function (Request $request) {
            return $request->user()->currentTeam;
        });
    }
}

Modifying Checkout

You can intercept Checkout options on the fly:

use Illuminate\Http\Request;
use RenokiCo\BillingPortal\BillingPortal;

class CashierRegisterServiceProvider extends BaseServiceProvider
{
    /**
     * Boot the service provider.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        // Modify the checkout model.
        BillingPortal::onCheckout(function ($checkout, Request $request, $billable, $plan, $subscription) {
            return $checkout->allowPromotionCodes();
        });

        // Intercept the Stripe Checkout options.
        BillingPortal::setStripeCheckoutOptions(function (Request $request, $billable, $plan, $subscription) {
            return [
                'payment_method_types' => ['card'],
            ];
        });
    }
}

🐛 Testing

vendor/bin/phpunit

🤝 Contributing

Please see CONTRIBUTING for details.

🔒 Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

🎉 Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].