/fuse-laravel:laravel-billingfrom fuse-laravel
Implements subscriptions, invoices, payment methods, webhooks, and billing portals with Laravel Cashier for Stripe or Paddle. Covers subscription lifecycle, metered billing, team billing, dunning, and feature flags.
Ships in fuse-laravel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
After implementation, run fuse-ai-pilot:sniper for validation.
Laravel Cashier provides subscription billing with Stripe or Paddle. Choose based on your needs:
| Provider | Package | Best For |
|---|---|---|
| Stripe | laravel/cashier | Full control, high volume, complex billing |
| Paddle | laravel/cashier-paddle | Tax handling, compliance, global sales |
| Aspect | Stripe | Paddle |
|---|---|---|
| Type | Payment Processor | Merchant of Record |
| Taxes | You manage (or Stripe Tax) | Paddle manages automatically |
| Invoices | Your company name | Paddle + your name |
| Compliance | Your responsibility | Paddle handles |
| Fees | ~2.9% + $0.30 | ~5% + $0.50 (all-inclusive) |
app/
├── Http/
│ ├── Controllers/
│ │ └── Billing/ ← Billing controllers
│ │ ├── SubscriptionController.php
│ │ ├── CheckoutController.php
│ │ └── InvoiceController.php
│ └── Middleware/
│ └── EnsureSubscribed.php ← Subscription check
├── Models/
│ └── User.php ← Billable trait
├── Listeners/
│ └── StripeEventListener.php ← Webhook handling
└── Services/
└── BillingService.php ← Business logic
config/
├── cashier.php ← Stripe/Paddle config
└── services.php ← API keys
routes/
└── web.php ← Webhook routes (excluded from CSRF)
When working in a FuseCore project, billing follows the modular structure:
FuseCore/
├── Core/ # Infrastructure (priority 0)
│ └── App/Contracts/
│ └── BillingServiceInterface.php ← Billing contract
│
├── User/ # Auth module (existing)
│ └── App/Models/User.php ← Add Billable trait here
│
├── Billing/ # Billing module (new)
│ ├── App/
│ │ ├── Http/
│ │ │ ├── Controllers/
│ │ │ │ ├── SubscriptionController.php
│ │ │ │ ├── CheckoutController.php
│ │ │ │ └── WebhookController.php
│ │ │ └── Middleware/
│ │ │ └── EnsureSubscribed.php
│ │ ├── Listeners/
│ │ │ └── HandleWebhookEvents.php
│ │ └── Services/
│ │ └── BillingService.php
│ ├── Config/
│ │ └── cashier.php ← Module-level config
│ ├── Database/Migrations/
│ ├── Routes/
│ │ ├── web.php ← Webhooks (no CSRF)
│ │ └── api.php ← Subscription management
│ └── module.json # dependencies: ["User"]
/FuseCore/Billing/ module/FuseCore/User//FuseCore/Billing/Routes/web.phppreventRequestForgery(except: [...]) (L13 PreventRequestForgery)"User" dependency in module.json→ See fusecore skill for complete module patterns.
Selling to businesses (B2B)? → Stripe
├── Need OAuth for third-party apps? → Stripe Connect
└── Selling to consumers (B2C) globally?
├── Want to handle taxes yourself? → Stripe + Stripe Tax
└── Want tax compliance handled? → Paddle
Recurring revenue? → Subscription
├── Fixed plans? → Single-price subscription
└── Usage-based? → Metered billing (Stripe) or quantity-based
Single purchase? → One-time charge
├── Digital product? → Checkout session
└── Service fee? → Direct charge
| Concept | Description | Reference |
|---|---|---|
| Billable | Trait that enables billing on a model | stripe.md |
| Subscription | Recurring billing cycle | subscriptions.md |
| Price ID | Stripe/Paddle price identifier | stripe.md |
| Grace Period | Time after cancellation with access | subscriptions.md |
| Webhook | Server-to-server payment notifications | webhooks.md |
| Customer Portal | Self-service billing management | checkout.md |
| Topic | Reference | When to Consult |
|---|---|---|
| Stripe Cashier | stripe.md | Stripe setup, configuration |
| Paddle Cashier | paddle.md | Paddle setup, differences |
| Subscriptions | subscriptions.md | Create, cancel, swap, pause |
| Webhooks | webhooks.md | Webhook security, handling |
| Invoices | invoices.md | PDF generation, receipts |
| Payment Methods | payment-methods.md | Cards, wallets, updates |
| Checkout | checkout.md | Hosted checkout, portal |
| Testing | testing.md | Test cards, webhook testing |
| Topic | Reference | When to Consult |
|---|---|---|
| Metered Billing | metered-billing.md | Usage-based pricing (API, storage) |
| Team Billing | team-billing.md | Organization billing, per-seat |
| Dunning | dunning.md | Failed payment recovery |
| Feature Flags | feature-flags.md | Plan-based feature access |
| Template | When to Use |
|---|---|
| UserBillable.php.md | User model with Billable trait |
| SubscriptionController.php.md | CRUD subscription operations |
| WebhookController.php.md | Custom webhook handling |
| CheckoutController.php.md | Stripe Checkout + Portal |
| InvoiceController.php.md | Invoice download |
| BillingRoutes.php.md | Complete route definitions |
| SubscriptionTest.php.md | Pest tests for billing |
| MeteredBillingController.php.md | Usage tracking and reporting |
| TeamBillable.php.md | Team model with seat management |
| DunningService.php.md | Payment recovery automation |
| FeatureFlags.php.md | Laravel Pennant per-plan features |
// Has active subscription?
$user->subscribed('default');
// Subscribed to specific price?
$user->subscribedToPrice('price_premium', 'default');
// On trial?
$user->onTrial('default');
// Cancelled but still active?
$user->subscription('default')->onGracePeriod();
// Simple subscription
$user->newSubscription('default', 'price_monthly')
->create($paymentMethodId);
// With trial
$user->newSubscription('default', 'price_monthly')
->trialDays(14)
->create($paymentMethodId);
$subscription = $user->subscription('default');
// Change plan
$subscription->swap('price_yearly');
// Cancel at period end
$subscription->cancel();
// Cancel immediately
$subscription->cancelNow();
// Resume cancelled subscription
$subscription->resume();
// Redirect to customer portal (Stripe)
return $user->redirectToBillingPortal(route('dashboard'));
// Get portal URL
$url = $user->billingPortalUrl(route('dashboard'));
IncompletePayment exceptionsCashier Stripe 16.x (current 16.9) and Cashier Paddle 2.x (current 2.8) are Laravel 13 compatible. Points to watch:
PreventRequestForgery CSRF protection must exclude webhook routes (stripe/webhook, paddle/webhook) via preventRequestForgery(except: [...])cache.serializable_classes (default false in L13): list the classes explicitly if you cache Cashier objects// bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
$middleware->preventRequestForgery(except: [
'stripe/*', 'paddle/*',
]);
})
references/checkout.md (opens in a new tab)references/dunning.md (opens in a new tab)references/feature-flags.md (opens in a new tab)references/invoices.md (opens in a new tab)references/metered-billing.md (opens in a new tab)references/paddle.md (opens in a new tab)references/payment-methods.md (opens in a new tab)references/stripe.md (opens in a new tab)references/subscriptions.md (opens in a new tab)references/team-billing.md (opens in a new tab)references/templates/BillingRoutes.php.md (opens in a new tab)references/templates/CheckoutController.php.md (opens in a new tab)references/templates/DunningService.php.md (opens in a new tab)references/templates/FeatureFlags.php.md (opens in a new tab)references/templates/InvoiceController.php.md (opens in a new tab)references/templates/MeteredBillingController.php.md (opens in a new tab)references/templates/SubscriptionController.php.md (opens in a new tab)references/templates/SubscriptionTest.php.md (opens in a new tab)references/templates/TeamBillable.php.md (opens in a new tab)references/templates/UserBillable.php.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fusengine/claude-plugins --plugin fuse-laravel23 skills in this plugin
/fusecoreUse when creating modules, understanding FuseCore structure, or implementing features in a FuseCore modular-monolith Laravel project./laravel-ai-sdkUse when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package./laravel-apiUse when creating API endpoints, transforming responses with API Resources, or handling API authentication, rate limiting, or versioning./laravel-architectureUse when structuring a Laravel project, creating services/repositories/actions, implementing dependency injection, or organizing code layers./laravel-attributesUse when migrating Eloquent models, Jobs, Console commands, Controllers, API Resources, Validation, Factories or Seeders to Laravel 13 PHP attributes./laravel-authUse when implementing user authentication, API tokens, social login, or authorization in Laravel 13.Other plugins' skills for the same job