PHPackages                             rahulpathak/stripe-subscription-manager-rsp - 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. rahulpathak/stripe-subscription-manager-rsp

ActiveLibrary[Payment Processing](/categories/payments)

rahulpathak/stripe-subscription-manager-rsp
===========================================

Laravel package for managing Stripe subscriptions using Laravel Cashier

01PHP

Since Sep 26Pushed 7mo agoCompare

[ Source](https://github.com/rahulpathak1706/stripe-package)[ Packagist](https://packagist.org/packages/rahulpathak/stripe-subscription-manager-rsp)[ RSS](/packages/rahulpathak-stripe-subscription-manager-rsp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Stripe Subscription Manager RSP - Team Documentation
====================================================

[](#stripe-subscription-manager-rsp---team-documentation)

A comprehensive Laravel package for managing Stripe subscriptions with seamless integration. Perfect for multi-project use with consistent subscription management.

**Developer:** Rahul Pathak ()
**Package:** `rsp/stripe-subscription-manager-rsp`

🚀 Key Features
--------------

[](#-key-features)

- **Easy User-Stripe Integration** - One trait adds all subscription functionality to User models
- **Magic Methods** - Access Stripe data directly: `$user->stripe_customer_id`
- **Complete Subscription Flow** - Subscribe, cancel, resume with simple method calls
- **Plan Management** - Ready-to-use controller for managing subscription plans
- **Webhook Handling** - Automatic sync with Stripe events
- **Trial Periods &amp; Coupons** - Full support for trials and discount codes
- **Payment History** - Complete transaction tracking
- **Multi-project Ready** - Easy to replicate across projects

📦 Installation &amp; Setup
--------------------------

[](#-installation--setup)

### 1. Install Package

[](#1-install-package)

```
composer require rsp/stripe-subscription-manager-rsp
```

### 2. Environment Variables

[](#2-environment-variables)

Add to your `.env`:

```
STRIPE_KEY=pk_test_your_stripe_publishable_key
STRIPE_SECRET=sk_test_your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
STRIPE_SUCCESS_URL=https://yoursite.com/subscription/success
STRIPE_CANCEL_URL=https://yoursite.com/subscription/cancel
STRIPE_CURRENCY=usd
```

### 3. Run Migrations

[](#3-run-migrations)

```
php artisan migrate
```

This creates: `subscription_plans`, `stripe_users`, `user_subscriptions`, `payment_history`, `coupons`

### 4. Add Trait to User Model

[](#4-add-trait-to-user-model)

```
