hadyfayed/laravel-agent/laravel-cashier

Claude Code and agent skill by hadyfayed/laravel-agent

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Laravel Cashier billing — Stripe/Paddle subscriptions, trials, invoices, webhooks, payment methods, single charges, and customer portal. Use when implementing subscriptions, recurring billing, Stripe or Paddle integration, checkout flows, or payment webhook handling. Triggers: "cashier", "stripe", "paddle", "subscription", "billing", "payment", "invoice", "checkout", "pricing", "recurring payment", "payment method", "webhook".

Install

npx vskill@latest install hadyfayed/laravel-agent/laravel-cashier

SKILL.md

The same SKILL.md was published earlier as hadyfayed/laravel-agent/laravel-cashier.

Laravel Cashier Skill

Implement subscription billing and payments with Laravel Cashier for Stripe or Paddle.

When to Use

  • Setting up subscription billing
  • Processing one-time payments
  • Managing payment methods
  • Creating pricing plans
  • Handling invoices and receipts
  • Managing customer portals
  • Processing webhooks from Stripe/Paddle
  • Implementing metered billing
  • Building checkout flows

Quick Start

bash
# Stripe (most popular)
composer require laravel/cashier
php artisan cashier:install
php artisan migrate
# Paddle
composer require laravel/cashier-paddle
php artisan vendor:publish --tag="cashier-migrations"
php artisan migrate

Conventions Checklist

Setup
  • [ ] Add the Billable trait to the billable model (Stripe: Laravel\Cashier\Billable; Paddle: Laravel\Paddle\Billable)
  • [ ] Cast trial_ends_at to datetime
  • [ ] Use Stripe price IDs (price_xxx), not deprecated plan IDs (plan_xxx)
  • [ ] Store all amounts in cents (Cashier expects cents)
Subscriptions
  • [ ] Name subscriptions (newSubscription('default', $priceId)) and check with subscribed('default')
  • [ ] Apply trials via ->trialDays(14)
  • [ ] Check status: subscribed(), onTrial(), onGracePeriod(), pastDue(), incomplete()
  • [ ] Handle multiple subscriptions by name ('default', 'premium')
  • [ ] Handle IncompletePayment — redirect to cashier.payment confirmation
Payment Methods
  • [ ] Use createSetupIntent() + Stripe.js for secure card collection
  • [ ] addPaymentMethod(), updateDefaultPaymentMethod(), removePaymentMethod()
  • [ ] Never collect or store raw card numbers server-side
Webhooks
  • [ ] Use Cashier's WebhookController (verifies signatures) — never a raw route
  • [ ] Set STRIPE_WEBHOOK_SECRET
  • [ ] Bypass CSRF on the webhook route (withoutMiddleware(VerifyCsrfToken))
  • [ ] Implement handlers: subscription.created/updated/deleted, invoice.payment_succeeded/failed

Common Pitfalls

  1. Unverified webhooks — use Cashier's controller + webhook secret; never process without verification
  2. Missing webhook CSRF exception — webhook route must bypass CSRF
  3. Hardcoded price IDs — use config/env for price IDs (price_xxx, not plan_xxx)
  4. Not handling `IncompletePayment` — redirect to payment confirmation
  5. Wrong currency format — Cashier expects cents (9999 = $99.99, not 99.99)
  6. Not syncing Stripe customer — create the customer before the subscription
  7. Ignoring grace periods — allow access until period end; offer resume
  8. Missing failed-payment handling — implement handleInvoicePaymentFailed
  9. Testing with live keys — always use test keys in development

Best Practices

  • Always use Stripe Checkout or Elements for PCI compliance
  • Set up webhook forwarding (stripe listen) during development
  • Send notifications for failed payments and provisioning events
  • Provide a customer portal for self-service
  • Use trial periods to increase conversions
  • Handle incomplete subscriptions gracefully
  • Log all webhook events and use metadata for tracking
  • Implement proration for plan changes

Related Commands

  • /laravel-agent:webhook:make — create webhook handler skeletons

Related Skills

  • laravel-api — Build billing APIs
  • laravel-queue — Process payments asynchronously
  • laravel-testing — Test payment flows
  • laravel-security — Secure payment endpoints

Additional references

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
13
Repository forks
1
7-day trend score
13

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hadyfayed/laravel-agent/laravel-cashier/badge)](https://verified-skill.com/skills/hadyfayed/laravel-agent/laravel-cashier)

Something wrong with this skill or its page? Tell us.