PHPackages                             amohamed/offline-cashier - 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. amohamed/offline-cashier

ActiveLibrary[Payment Processing](/categories/payments)

amohamed/offline-cashier
========================

A Laravel package for managing offline and online subscriptions with support for cash, check, bank transfer, and Stripe payments

67PHP

Since Dec 27Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Abdallah-Tah/offline-cashier)[ Packagist](https://packagist.org/packages/amohamed/offline-cashier)[ RSS](/packages/amohamed-offline-cashier/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OfflineCashier Documentation
============================

[](#offlinecashier-documentation)

OfflineCashier is a Laravel package that provides subscription and payment management with support for both offline and online payment methods.

Features
--------

[](#features)

- Subscription Management (create, cancel, resume, change plans)
- Multiple Payment Methods (cash, check, bank transfer, Stripe)
- Invoice Generation
- PDF Generation
- Email Notifications
- Stripe Integration
- Customizable Views
- Event System
- Automatic Feature Assignment: Automatically assigns features to subscriptions based on the selected plan.
- Customizable Feature Assignment: Provides a hook for developers to customize or override the default feature assignment logic.

Table of Contents
-----------------

[](#table-of-contents)

1. [Installation](docs/installation.md)
2. [Configuration](docs/configuration.md)
3. [Basic Usage](docs/basic-usage.md)
4. [Payment Methods](docs/payment-methods.md)
5. [Events &amp; Notifications](docs/events-notifications.md)
6. [Stripe Integration](docs/stripe-integration.md)
7. [Invoice Generation](docs/invoice-generation.md)
8. [Testing](docs/testing.md)

Example Usage
-------------

[](#example-usage)

Here's an example of how to use the `SubscriptionService` and `InvoiceService` within a Livewire component to manage subscriptions and payments:

```
namespace App\Livewire\Subscription;

use Livewire\Component;
use AMohamed\OfflineCashier\Models\Plan;
use AMohamed\OfflineCashier\Models\Subscription;
use Illuminate\Support\Facades\Auth;
use AMohamed\OfflineCashier\Services\InvoiceService;
use Illuminate\Support\Facades\Log;
use AMohamed\OfflineCashier\Services\SubscriptionService;

class SubscriptionComponent extends Component
{
    public $plans;
    public $selectedPlan;
    public $paymentMethod = 'cash';
    public $referenceNumber;
    protected $invoiceService;
    protected $subscriptionService;

    public function __construct()
    {
        $this->invoiceService = new InvoiceService();
        $this->subscriptionService = new SubscriptionService();
    }

    public function mount()
    {
        $this->plans = Plan::with('features')->get();
    }

    public function selectPlan($planId)
    {
        $this->selectedPlan = Plan::find($planId);
    }

    public function subscribe()
    {
        $this->validate([
            'selectedPlan' => 'required',
            'paymentMethod' => 'required|in:cash,check,bank_transfer,stripe',
            'referenceNumber' => 'required_if:paymentMethod,cash,check,bank_transfer'
        ]);

        $subscription = $this->subscriptionService->create(Auth::user(), $this->selectedPlan, $this->paymentMethod);

        $payment = $subscription->payments()->create([
            'amount' => $this->selectedPlan->price,
            'payment_method' => $this->paymentMethod,
            'status' => 'completed',
            'reference_number' => $this->referenceNumber,
            'paid_at' => now(),
        ]);

        $this->invoiceService->generate($payment);

        session()->flash('message', 'Successfully subscribed to ' . $this->selectedPlan->name);

        $this->reset(['selectedPlan', 'paymentMethod', 'referenceNumber']);
    }

    public function render()
    {
        return view('livewire.subscription.subscription-component');
    }
}
```

Visual Representation
---------------------

[](#visual-representation)

[![Subscription Process](examples/image.png)](examples/image.png)

This image illustrates the subscription creation process and feature assignment.

Project Example
---------------

[](#project-example)

For a practical example of how to use the OfflineCashier package, check out this [GitHub repository](https://github.com/Abdallah-Tah/cashier). It demonstrates the implementation of the package in a real-world project.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a61545d3e749019b5ae58160977437da6b0037203955060fb9829807e22c1b4?d=identicon)[abdallah-tah](/maintainers/abdallah-tah)

---

Top Contributors

[![Abdallah-Tah](https://avatars.githubusercontent.com/u/96321216?v=4)](https://github.com/Abdallah-Tah "Abdallah-Tah (18 commits)")

### Embed Badge

![Health badge](/badges/amohamed-offline-cashier/health.svg)

```
[![Health](https://phpackages.com/badges/amohamed-offline-cashier/health.svg)](https://phpackages.com/packages/amohamed-offline-cashier)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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