Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Laravel Cashier (Stripe) is Laravel’s official package for Stripe billing. You can use it to create and manage subscriptions, run one-time charges, retrieve invoices, and handle Stripe webhooks through a fluent API.Installation and configuration
Install Cashier and run its database migrations.Billable trait to your billable model.
.env.
Customer management
UsecreateOrGetStripeCustomer() when you want to safely fetch or create the Stripe customer record.
createAsStripeCustomer() when you explicitly want to create a customer first.
Subscriptions
Create a subscription
Create a subscription withnewSubscription() and create().
Pass a Payment Method ID (for example, from Stripe.js) as $paymentMethodId.
price_monthly is an example. Use the actual Stripe Price ID from your Stripe dashboard.
Check status
Usesubscribed() to check whether a user currently has an active subscription.
Cancel and resume
One-time charges
Usecharge() for one-time billing. Pass the amount in the lowest currency denomination (for example, 100 means $1.00 in USD). Use a Stripe Payment Method ID as $paymentMethodId.
charge() throws an exception.
Invoices
Retrieve invoices withinvoices().
dompdf/dompdf and call downloadInvoice(). Pass an invoice ID from the invoices() collection as $invoiceId.
Webhook setup
Cashier automatically registers a Stripe webhook route and uses/stripe/webhook by default. Configure this URL in your Stripe dashboard.
You can create the webhook through Artisan.
stripe/* from CSRF protection.
STRIPE_WEBHOOK_SECRET in .env so Cashier can validate webhook signatures.