Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

laravel-billing

БесплатноБез исполняемых скриптовНе проверен

Use when implementing subscriptions, invoices, payment methods, webhooks, or billing portals with Laravel Cashier (Stripe or Paddle).

Fusengineот Fusengine★ 36 звёзд на GitHub7 установок в других каталогах

Об этом скилле

Covers Laravel Cashier for Stripe and Paddle: choosing between the two (payment processor vs merchant-of-record, tax handling, fees), subscription lifecycle (create, swap, cancel, resume, trials, grace periods), webhooks and signature verification, invoices, payment methods, checkout/customer portal, metered/usage-based billing, team/per-seat billing, dunning (failed-payment recovery), and Pennant-based feature flags per plan. Includes FuseCore modular-project integration. For multi-vendor/marketplace split payments, see laravel-stripe-connect instead.

Laravel Billing (Cashier)

Agent Workflow (MANDATORY)

Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Check existing billing setup, User model
  2. fuse-ai-pilot:research-expert - Verify latest Cashier docs via Context7
  3. mcp__context7__query-docs - Query specific patterns (Stripe/Paddle)

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

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

Key Difference: MoR vs Payment Processor

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)

Critical Rules

  1. Use webhooks - Never rely on client-side confirmations
  2. Handle grace periods - Allow access until subscription ends
  3. Never store card details - Use payment tokens/methods
  4. Test with test keys - Always before production
  5. Verify webhook signatures - Prevent spoofing attacks
  6. Handle incomplete payments - 3D Secure requires user action

Architecture

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)

FuseCore Integration

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 Checklist

  • Billing code in /FuseCore/Billing/ module
  • Billable trait on User model in /FuseCore/User/
  • Webhook routes in /FuseCore/Billing/Routes/web.php
  • Exclude webhook from CSRF via preventRequestForgery(except: [...]) (L13 PreventRequestForgery)
  • Declare "User" dependency in module.json

→ See fusecore skill for complete module patterns.


Decision Guide

Stripe vs Paddle

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

Subscription vs One-Time

Recurring revenue? → Subscription
├── Fixed plans? → Single-price subscription
└── Usage-based? → Metered billing (Stripe) or quantity-based
Single purchase? → One-time charge
├── Digital product? → Checkout sessi
Полный SKILL.md на GitHub

Установить laravel-billing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/checkout.mdreferences/dunning.mdreferences/feature-flags.mdreferences/invoices.mdreferences/metered-billing.mdreferences/paddle.mdreferences/payment-methods.mdreferences/stripe.mdreferences/subscriptions.mdreferences/team-billing.mdreferences/templates/BillingRoutes.php.mdreferences/templates/CheckoutController.php.mdreferences/templates/DunningService.php.mdreferences/templates/FeatureFlags.php.mdreferences/templates/InvoiceController.php.mdreferences/templates/MeteredBillingController.php.mdreferences/templates/SubscriptionController.php.mdreferences/templates/SubscriptionTest.php.mdreferences/templates/TeamBillable.php.mdreferences/templates/UserBillable.php.mdreferences/templates/WebhookController.php.mdreferences/testing.mdreferences/webhooks.md

FAQ

Что делает скилл laravel-billing?

Use when implementing subscriptions, invoices, payment methods, webhooks, or billing portals with Laravel Cashier (Stripe or Paddle).

Как установить скилл laravel-billing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл laravel-billing запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить laravel-billing с