Laravel Cashier for Chargebee — subscriptions, metering, and billing that works the way Laravel developers expect.
$ composer require chargebee/cashierChargebee's Laravel Cashier integration uses the same Eloquent-style fluent API you already know.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class SubscriptionController extends Controller
{
public function store(Request $request)
{
$user = $request->user();
$user->newSubscription('default', 'price_monthly')
->trialDays(14)
->create($request->paymentMethod);
return redirect('/dashboard');
}
}A quick overview of Chargebee's Laravel Cashier integration.
Not locked into one payment processor. Connect Stripe, Braintree, PayPal, and more — switch or combine without rewriting billing logic.
Drop-in, Chargebee-hosted pages for checkout and self-serve billing management. No UI to build, no PCI scope to worry about — just redirect and let Chargebee handle it.
Automated retry logic, customizable dunning workflows, and cancellation deflection — the stuff you'd otherwise build yourself at scale.
Define feature access at the plan level and check it in your code. Gate features, enforce limits, and roll out access — without hardcoding plan names.
The standalone PHP SDK works with any PHP framework or vanilla PHP.
use Chargebee\ChargebeeClient;
$chargebee = new ChargebeeClient(options: [
'site' => 'your-site',
'apiKey' => 'your-api-key',
]);
$result = $chargebee->subscription()->createWithItems("{{customer-id}}", [
"subscription_items" => [
[
"itemPriceId" => "Monthly_USD",
"unitPrice" => 100,
]
],
]);