Download the PHP package emeroid/laravel-billing-core without Composer

On this page you can find all versions of the php package emeroid/laravel-billing-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-billing-core

Laravel Billing Core

Laravel Billing Core is a robust, driver-based, multi-gateway billing package for Laravel. It provides a simple, fluent API to manage one-time payments, subscriptions, plan swapping, and dunning logic for your SaaS application.

Stop rebuilding billing logic for every project — this package is the plug-and-play foundation you need.


🚀 Features


🧩 Installation

1. Configuration

Publish the Config File

This creates config/billing.php.

Publish the Migrations

This adds the plans, subscriptions, and transactions tables.

Run the Migrations

Update Your .env File

Add the Billable Trait


💳 Usage

2. Creating Plans

Before creating subscriptions, define your plans in the plans table — typically via a seeder:


3. One-Time Payments


4. Subscriptions


5. Handling Callbacks

After payment, users are redirected to your site. The built-in CallbackController handles:

All of this happens automatically.


6. Handling Webhooks

Add these URLs to your gateway dashboards:

The package automatically handles:


7. The Billable Trait API


8. Events

Listen for billing events in your EventServiceProvider:


Emeroid Billing Package Customization

This document explains how to configure the Emeroid Billing package to correctly identify the billable entity when the customer’s payment gateway email does not directly match the billable model’s email field.

In many SaaS applications, a subscription belongs to a Team or Organization, even though the User making the payment uses their personal email.


1. Custom Billable Lookup Strategy

By default, the AbstractDriver attempts to locate the Billable Model (e.g., Team) by matching the email directly on that model.

If your Billable Model does not store the customer’s email, you must implement a custom lookup strategy.

Implementation: The BillableLookup Class

Create a lookup class that identifies the Billable Model (Team) through an associated User.

This method must have the exact signature:

Example: app/Lookups/BillableLookup.php


2. Configuration

Register the custom lookup method inside config/billing.php under your gateway settings:


3. How the Driver Uses the Strategy

The Emeroid\Billing\Drivers\AbstractDriver is designed to check for your custom lookup first:


Conclusion

This customization ensures reliable billing behavior even when your architecture involves multi-layer ownership structures (e.g., users owning teams). The billing package will correctly identify the billable entity through your defined strategy, preventing mismatches and failed invoice processing.


🧪 Testing


🤝 Contributing

Please see CONTRIBUTING.md for details.


🔒 Security

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


📄 License

Licensed under the MIT License (MIT). See the License File for more information.


❤️ Sponsorship

This project is free and open-source. If it helps you build your business, please consider supporting its development.

Sponsor @emeroid on GitHub.



All versions of laravel-billing-core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0 || ^11.0 || ^12.0
illuminate/database Version ^10.0 || ^11.0 || ^12.0
illuminate/routing Version ^10.0 || ^11.0 || ^12.0
illuminate/http Version ^10.0 || ^11.0 || ^12.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package emeroid/laravel-billing-core contains the following files

Loading the files please wait ...