Commet
  • Pricing
Log InTry out

Add billing with
Laravel

Start billing for freeRead docs

Built for Laravel

Billing that fits your stack

Register Commet as a singleton in your service provider and inject it into controllers. Laravel's CSRF protection, validation, and routing work seamlessly with billing endpoints.

app/Http/Controllers/BillingController.php
<?php
namespace App\Http\Controllers;
use Commet\Commet;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class BillingController extends Controller
{
public function __construct(
private Commet $commet,
) {}
public function subscribe(Request $request): JsonResponse
{
$this->commet->customers->create(
email: $request->input('email'),
id: $request->input('customer_id'),
);
$subscription = $this->commet->subscriptions->create(
customerId: $request->input('customer_id'),
planCode: 'pro',
);
return response()->json([
'checkout_url' => $subscription->data['checkout_url'],
]);
}
}
<?php
namespace App\Http\Controllers;
use Commet\Commet;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class BillingController extends Controller
{
public function __construct(
private Commet $commet,
) {}
public function subscribe(Request $request): JsonResponse
{
$this->commet->customers->create(
email: $request->input('email'),
id: $request->input('customer_id'),
);
$subscription = $this->commet->subscriptions->create(
customerId: $request->input('customer_id'),
planCode: 'pro',
);
return response()->json([
'checkout_url' => $subscription->data['checkout_url'],
]);
}
}

Get started

Install in seconds

Add billing to your Laravel app with the Commet SDK. Controllers, service providers, and routes for subscriptions and usage tracking.

Get startedDocumentation
Terminal
composer require commet/commet-php
composer require commet/commet-php

Frequently Asked Questions

Install the Commet SDK, add your API key, and start billing. Follow the Laravel integration guide for a step-by-step walkthrough with code examples.

Commet supports metered (pay for what you use), credits (block when exhausted), balance (spend across features), seats (per-user pricing), and boolean (feature gating). Learn more in the consumption models guide.

Yes. Call the usage tracking method whenever a billable event happens. Commet aggregates usage and bills it at the end of each billing period. Works for API calls, AI tokens, storage, or any custom metric. See the usage tracking guide for details.

Yes. Commet has a built-in AI model catalog with per-token pricing. You can track input, output, and cache tokens with configurable margins. See the AI token billing guide for setup instructions.

Yes. Commet is a Merchant of Record that handles taxes, compliance, refunds, and payouts. Stripe Tax is integrated for automatic tax calculation. Read more about the Merchant of Record model.

Commet has no setup fees and no monthly minimums. You only pay 4.5% + $0.40 per successful transaction. You can start building and testing for free using the sandbox environment. See pricing for details.

Start billing in minutes

No setup fees. No monthly minimums. 4.5% + $0.40 per successful transaction.

Start billing for free

Developers

  • Documentation
  • Templates
  • GitHub

Resources

  • Blog
  • Changelog
  • Pricing

AI

  • Agents
  • MCP Server
  • Agent Skills
  • Claude Code
  • Codex

Learn

  • Guides
  • Glossary
  • Solutions
  • Billing for AI Models
  • Comparison

Company

  • About
  • Terms
  • Privacy
XLinkedInGitHub