Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

laravel-billingLaravel billing 搜索

Agent Skill

laravel-billing 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

857

周安装

35

GitHub Stars

11

下载量

274
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:laravel-billing(Laravel billing 搜索)
来源仓库:https://github.com/fusengine/agents
仓库路径:skills/laravel-billing
安装命令:
npx skills add https://github.com/fusengine/agents --skill laravel-billing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/fusengine/agents --skill laravel-billing

简介

用于检索 Laravel 项目中与计费系统相关的信息。

  • 适合查找支付集成、订阅逻辑和账单管理相关内容。
  • 可辅助识别常见实现模式和潜在问题点。
  • 安装命令:npx skills add https://github.com/fusengine/agents --skill laravel-billing
  • 建议在使用前确认数据来源和维护状态。

SKILL.md

Laravel Billing (Cashier)

Agent Workflow (MANDATORY)

Before ANY implementation, use TeamCreate to spawn 3 agents:

  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:

ProviderPackageBest For
Stripelaravel/cashierFull control, high volume, complex billing
Paddlelaravel/cashier-paddleTax handling, compliance, global sales

Key Difference: MoR vs Payment Processor

AspectStripePaddle
TypePayment ProcessorMerchant of Record
TaxesYou manage (or Stripe Tax)Paddle manages automatically
InvoicesYour company namePaddle + your name
ComplianceYour responsibilityPaddle 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 in VerifyCsrfToken
  • 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 session
└── Service fee? → Direct charge

Key Concepts

ConceptDescriptionReference
BillableTrait that enables billing on a modelstripe.md
SubscriptionRecurring billing cyclesubscriptions.md
Price IDStripe/Paddle price identifierstripe.md
Grace PeriodTime after cancellation with accesssubscriptions.md
WebhookServer-to-server payment notificationswebhooks.md
Customer PortalSelf-service billing managementcheckout.md

Reference Guide

Concepts (WHY & Architecture)

TopicReferenceWhen to Consult
Stripe Cashierstripe.mdStripe setup, configuration
Paddle Cashierpaddle.mdPaddle setup, differences
Subscriptionssubscriptions.mdCreate, cancel, swap, pause
Webhookswebhooks.mdWebhook security, handling
Invoicesinvoices.mdPDF generation, receipts
Payment Methodspayment-methods.mdCards, wallets, updates
Checkoutcheckout.mdHosted checkout, portal
Testingtesting.mdTest cards, webhook testing

Advanced SaaS Features

TopicReferenceWhen to Consult
Metered Billingmetered-billing.mdUsage-based pricing (API, storage)
Team Billingteam-billing.mdOrganization billing, per-seat
Dunningdunning.mdFailed payment recovery
Feature Flagsfeature-flags.mdPlan-based feature access

Templates (Complete Code)

TemplateWhen to Use
UserBillable.php.mdUser model with Billable trait
SubscriptionController.php.mdCRUD subscription operations
WebhookController.php.mdCustom webhook handling
CheckoutController.php.mdStripe Checkout + Portal
InvoiceController.php.mdInvoice download
BillingRoutes.php.mdComplete route definitions
SubscriptionTest.php.mdPest tests for billing
MeteredBillingController.php.mdUsage tracking and reporting
TeamBillable.php.mdTeam model with seat management
DunningService.php.mdPayment recovery automation
FeatureFlags.php.mdLaravel Pennant per-plan features

Quick Reference

Check Subscription Status

// 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();

Create Subscription

// Simple subscription
$user->newSubscription('default', 'price_monthly')
    ->create($paymentMethodId);

// With trial
$user->newSubscription('default', 'price_monthly')
    ->trialDays(14)
    ->create($paymentMethodId);

Manage Subscription

$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();

Billing Portal

// Redirect to customer portal (Stripe)
return $user->redirectToBillingPortal(route('dashboard'));

// Get portal URL
$url = $user->billingPortalUrl(route('dashboard'));

Best Practices

DO

  • Use webhooks for payment confirmation
  • Implement grace periods for cancelled subscriptions
  • Set up webhook signature verification
  • Handle IncompletePayment exceptions
  • Test with Stripe CLI locally
  • Prune old data regularly

DON'T

  • Trust client-side payment confirmations
  • Store card numbers (PCI compliance)
  • Skip webhook verification
  • Ignore failed payment webhooks
  • Forget to handle 3D Secure
  • Hardcode prices (use env or config)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.79%
按下载量换算101

Claude

31.8%
按下载量换算87

Cursor

18.3%
按下载量换算50

Gemini CLI

10.3%
按下载量换算28

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/fusengine/agents --skill laravel-billing 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills